|
Posted by Kimmo Laine on 11/17/39 11:36
"John K" <kinane3@yahoo.com> kirjoitti
viestissδ:1136472625.713370.167400@f14g2000cwb.googlegroups.com...
>I recently took a job doing PHP but come from an ASP background. I'm
> trying to find a conversion equivalent for VBScript's "formatdatetime".
>
> All I want to do is convert a MySQL datetime field into a long date.
> e.g. 2006-01-30 to January 1, 2006.
>
$unixTimeStamp = strtotime('2006-01-30');
date('F d, Y', $unixTimeStamp);
Returns January 30, 2006
--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.berkeley.edu/>
Kimmo Laine <antaatulla.sikanautaa@gmail.com.NOSPAM.invalid>
Navigation:
[Reply to this message]
|