[2.5.1] Comparing dates?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Feb 9 05:06:10 CET 2009


En Wed, 04 Feb 2009 14:11:07 -0200, Gilles Ganault <nospam at nospam.com>  
escribió:
> On Mon, 2 Feb 2009 22:00:53 +0100, Martin <martin at marcher.name> wrote:

>> as suggested, the DBA should seriously think about defining the
>> correct type of the column here, for intermediate use and getting
>> stuff to work you could use a view and define some stored procedures
>> on it so that inserting properly works...
>
> Right, but SQLite only has two types: Numeric or text, so I figured
> it'd be better to turn dates into the usual YYYY-MM-DD before saving
> data into an SQLite file.

I'd use the built-in adapter/converter instead of rolling my own:
http://docs.python.org/library/sqlite3.html#default-adapters-and-converters

-- 
Gabriel Genellina




More information about the Python-list mailing list