>try doing
>"SELECT UNIX_TIMESTAMP('1990-2-31')"
>and you'll get a number.
>This is very weird, since this is an incorrect date.
>
>Is there any way to figure out if a date is correct in mysql
>SQL implementation? And why UNIX_TIMESTAMP does
>not return NULL for incorrect date?

Sir, this seems to work.

SELECT If(DayOfMonth(From_Unixtime(Unix_Timestamp('1990-2-31'))) = 
DayOfMonth('1990-2-31'), '1990-2-31', NULL);

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection.     -Khushhal Khan Khatak

---------------------------------------------------------------------
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