Right Date format mask

Right Date format mask

am 14.09.2009 22:33:40 von John Meyer

I'm pulling in a date with the following format
9/14/2009 2:12:48 PM
And using this mask to convert it using the str_to_date() function:
%e %m %Y %r

but it keeps giving me an error. Do I have the right mask?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Right Date format mask

am 14.09.2009 23:27:37 von Dan Nelson

In the last episode (Sep 14), John Meyer said:
> I'm pulling in a date with the following format
> 9/14/2009 2:12:48 PM
> And using this mask to convert it using the str_to_date() function:
> %e %m %Y %r
>
> but it keeps giving me an error. Do I have the right mask?

Nope. Assuming your input string is in mm/dd/yyy format, you would want a
format string of "%m/%e/%Y %r".

--
Dan Nelson
dnelson@allantgroup.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Right Date format mask

am 15.09.2009 00:26:21 von John Meyer

Dan Nelson wrote:
> In the last episode (Sep 14), John Meyer said:
>
>> I'm pulling in a date with the following format
>> 9/14/2009 2:12:48 PM
>> And using this mask to convert it using the str_to_date() function:
>> %e %m %Y %r
>>
>> but it keeps giving me an error. Do I have the right mask?
>>
>
> Nope. Assuming your input string is in mm/dd/yyy format, you would want a
> format string of "%m/%e/%Y %r".
>
>

To quote the great sage and eminent drunkie Homer Simpson "Doh!"

Thanks.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org