One way would be for MySQL to convert it for you, using the date_format() builtin function:
Assuming column b contains 20020620233544 in a timestamp field, then:
select date_format(b, '%W, %M %D, %Y, %l:%i%p') as date from foo;
will return:
"Thursday, June 20th, 2002, 11:35PM" in a recordset column named "date" ______________________________________________________________________
Perfection in engineering does not happen when there is nothing more to add.
Rather it happens when there is nothing more to take away.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.