On Fri, 10 May 2002, Paul DuBois wrote:

> At 12:06 +0100 5/9/02, Sandeep Murphy wrote:
> >Hi,
> >
> >What appears to be the problem with the fwg query:
> >
> >select code,date from multimedia_header where rubrica=87 and  now() >
> >'08-03-2002 13:10:53' and date IS NOT NULL
> >
> >The records returned includes those earlier than 08-03-2002 13:10:53  too..
> 
> Dates in MySQL are in CCYY-MM-DD format, not MM-DD-CCYY.

How are you inserting that date value into the statement.
Are you using JDBC? If so then be careful to use java.sql.Date
instead of java.util.Date. The effect of doing this is that
java.sql.Date extends java.util.Date and overrides the
toString() method used to extract the date so that
the output is in standard SQL YYYY-MM-DD format.
This format is also known as ISO 8601. This is
what everyone ought to be using but alas some
vendors such as Oracle use an DD-MMM-YYYY
format as the default.

Bye,

Neil


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to