Click to See Complete Forum and Search --> : PHP : Converting MySQL DateTime format to 'Monday, 4 feb 2002'
SkiNLaB
Feb 5th, 2002, 09:19 PM
There's gotta be a function out there to convert the MySQL DateTime format to something like 'Monday, 4 feb 2002' for eg, or similar...
Thanx
scoutt
Feb 5th, 2002, 11:32 PM
well you can try this
getdate(timestamp); // returns an associative array with date/time settings for the specified timestamp
other than that I would store the date using date(l j M Y);
'Monday, 4 feb 2002'
$today = date("l, j M Y"); // Saturday 10 Mar 2002
l = lowercase L
SkiNLaB
Feb 6th, 2002, 01:18 AM
$new_date = date["l' j N Y, G:i:s", strtotime[$date_time]];
echo "$new_date";
the original string in mysql format was date_time
this seems to do the trick.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.