Re: [2.5.1] Comparing dates?

2009-02-08 Thread Gabriel Genellina
En Wed, 04 Feb 2009 14:11:07 -0200, Gilles Ganault escribió: On Mon, 2 Feb 2009 22:00:53 +0100, Martin 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

Re: [2.5.1] Comparing dates?

2009-02-04 Thread Gilles Ganault
On Mon, 2 Feb 2009 22:00:53 +0100, Martin 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... Rig

Re: [2.5.1] Comparing dates?

2009-02-02 Thread Martin
Hi, 2009/2/2 Gilles Ganault : > Thanks guys. For those interested, here's how to perform the > conversion from DD/MM/ to -MM-DD: 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

Re: [2.5.1] Comparing dates?

2009-02-02 Thread Gilles Ganault
On Mon, 02 Feb 2009 20:06:02 +1100, Ben Finney wrote: >The Python data types for date and time are in the ‘datetime’ module >http://www.python.org/doc/2.6/library/datetime>. Create a >‘datetime’ object for each value you want, then compare them. Thanks guys. For those interested, here's how to pe

Re: [2.5.1] Comparing dates?

2009-02-02 Thread Ben Finney
Gilles Ganault writes: > I have data in an SQL database where one column contains a > date formated as DD/MM/Y. > > I need to select all rows where the date is before, say Feb 1st > 2009, ie. 01/02/2009. The Python data types for date and time are in the ‘datetime’ module http://www.p

[2.5.1] Comparing dates?

2009-02-02 Thread Gilles Ganault
Hello I have data in an SQL database where one column contains a date formated as DD/MM/Y. I need to select all rows where the date is before, say Feb 1st 2009, ie. 01/02/2009. Is there a command in Python that does this easily, or should I look into whatever date() function the SQL