Page 1 of 1

PHP timestamp Issue

Posted: Fri Jan 21, 2005 3:31 pm
by asj
I have a timestamp which is being added to the database like " 2004-11-11 16:30:20" and I need to add 3 hours to it, and format it to something more ledgable like November 11, 2004 - 4:30:20.

Can someone please help me out with this please.

Thanks.

Aaron Jorgensen

Posted: Fri Jan 21, 2005 3:48 pm
by feyd
if php generates the timestamp, then you can use strtotime('+3 hours') or similar for 3 hrs from now.

If mysql is generating the timestamp there are a number of ways. Read through the functions and code featured here: http://dev.mysql.com/doc/mysql/en/Date_ ... tions.html