Wednesday, October 03, 2007
« Now ZoomInfo Thinks I'm a Bigshot | Main | MySQL dates quiz - Answer »

First correct answer to win 1 free beer!(List of beers available upon request)
Post your answer in the comments.

The question:
I am trying to enter the value "30/03/2007 02:15:00" into a datetime column in MySQL and get the error "incorrect datetime".
What's wrong?

*update* Hint #1: format is okay, MySQL knows that 30 is day, 3 is month, 2 is hour and so on.
*update*: Solved! Answer here.

Fine print:
1. The free beer prize is available only within 25 miles of Ramat Gan. No beer-by-mail.
2. Shlomo may not participate.

Wednesday, October 03, 2007 11:11:07 PM (Jerusalem Daylight Time, UTC+03:00)  #    Disclaimer  |  Comments [4]  | 
Thursday, October 04, 2007 1:28:42 AM (Jerusalem Daylight Time, UTC+03:00)
I had my hopes high till i read the last part :P
Shlomo
Thursday, October 04, 2007 3:14:30 AM (Jerusalem Daylight Time, UTC+03:00)
According to the MySQL reference (http://dev.mysql.com/doc/refman/5.0/en/datetime.html) this isn't even a valid date time, but I assume I'm missing something. I tried creating a test table with hebrew charset/collation and I'm still getting the same error.

So I'm waiting for the solution :-)


Thursday, October 04, 2007 4:36:40 AM (Jerusalem Daylight Time, UTC+03:00)
I'm a good Googler(?):
http://benjisimon.blogspot.com/2007/08/sql-brain-teaser-why-incorrect-datetime.html

Waiting for your beer...
Thursday, October 04, 2007 9:22:14 PM (Jerusalem Daylight Time, UTC+03:00)
:(
I saw this only today, Oren should not participate too :)
Pasha - Good Question.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):