List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:January 28 2005 8:02pm
Subject:Re: Date Conversion on Mysql 4.0.2
View as plain text  
Minh La wrote:
> Hi, Can some help me with a date conversion problme
> that I am having.
> I have a date data in the following format:
> 'Month Days Year Hour:Minute AM/PM'
> Example: 'Aug 21, 2004 2:00 PM'
> So far the hours that I have spent have been in vain. 
> I tried using str_to_date, but it keeps failing. 
> Looks like it's not in version 4.0.2?


Your options are:

  * upgrade to 4.1
  * parse and convert the date in your applications
  * use an ugly combination of SUBSTRING() and CASE to parse out the date
  * write a UDF implementing STR_TO_DATE()
  * backport STR_TO_DATE() to 4.0

Sasha Pachev
AskSasha Linux Consulting

Date Conversion on Mysql 4.0.2Minh La28 Jan
  • Re: Date Conversion on Mysql 4.0.2Hassan Schroeder28 Jan
  • Re: Date Conversion on Mysql 4.0.2Sasha Pachev28 Jan