List:General Discussion« Previous MessageNext Message »
From:Janek Bogucki Date:May 22 2009 10:17am
Subject:Re: Date Time
View as plain text  
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'));

mysql> select * from t;
+---------------------+
| d                   |
+---------------------+
| 2009-05-21 03:15:28 |
+---------------------+
1 row in set (0.01 sec)

On Thu, 2009-05-21 at 15:19 -0600, John Meyer wrote:
> Is "Thu May 21 03:15:28 +0000 2009" a valid date/time string?
> 

-- 
Best Regards,
-Janek Bogucki, CMDEV 5.0.
StudyLink. Helping People Realise Their Potential.
http://studylink.com


Thread
Date TimeJohn Meyer21 May
  • RE: Date TimeMartin Gainty22 May
  • Re: Date TimeJanek Bogucki22 May
    • Re: Date TimeJohn Meyer22 May
      • RE: Date TimeMartin Gainty22 May
    • Re: Date TimeJohn Meyer22 May
      • Re: Date TimeMichael Dykman22 May