Janek Bogucki wrote:
Hi John,

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html includes
some information about acceptable literal forms for dates and times.

'Thu May 21 03:15:28 +0000 2009' is not an acceptable literal form but
this is how to parse it APART from the time zone component. I could not
see from the documentation how to specify the time zone component so the
format below IGNORES the time zone.

mysql> create table t(d datetime);

mysql> insert into t(d) values(str_to_date('Thu May 21 03:15:28 +0000 2009', 
'%a %b %e %H:%i:%s +0000 %Y'));

Thanks.  That'll work.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to