I am at my wits end at the moment. I am pulling a datetimestamp out of a
database and attempting to get the year month and day out of it. However
I am stumped as how to do it.
The format is "YYYY-MM-DD HH:MM:SS" and its coming out of a mySQL
database. Is there anyway I can get the information I need out of here?
I have tried $nday = date("d", $row) and so on but all i get out of
that is Year = 1970, Month = 01, Day = 01.
Heres the code Im using now with getdate()
while($row = mysql_fetch_row($fres))
$odate = getdate($row);
$oday = date("d", $odate);
$omonth = date("m", $odate);
$oyear = date("Y", $odate);
Any help would be appreciated.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php