> I have, in my database, a bunch of dates stored like this: 
 > YYYY-M. Month is obviously the number of the month (5), not 
 > the name (May).
 > 
 > I want to convert the format to MMM, YYYY (ex: May, 2002), 

Do the conversion in MySQL - it'll save you grief in the long run...

SELECT DATE_FORMAT(YYYY-M, '%b %y') AS DisplayDate FROM SomeTable WHERE
some = 'condition'

Will work with appropriate substitutions for your table structure.

CYA, Dave




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to