January 5th, 2009 TIME output
I have a DB table with a TIME field like 12:30:00, I would like the output on the web page to have one hour subtracted from it. So it would read 11:30:00.
Can that be done?
Thanks
Chad
You can do it from the select statement right away like
$data = mysql_query("SELECT date_sub(field, INTERVAL 1 hour) FROM table");
$newdate = explode(":", $olddate);
$newdate[0] = $newdate[0] - 1;
$olddate = "$newdate[0]:$newdate[1]:$newdate[2]";
#If you have any other info about this subject , Please add it free.# |