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
PHP timestamp Issue
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
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
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