Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manipulate datetime from mysql

Status
Not open for further replies.

slackerJr

Programmer
Jul 10, 2006
4
0
0
SE
Hello!

I need help with something, I need to fetch a datetime from a mysql database, add 5 minutes to it using PHP and finally insert the new date in the db again...


I got stuck on this, any suggestion?
 
Code:
$val = "" //mysql datetime
$newval = strtotime("+ 5 minutes", strtotime($va));

but you could do it all in mysql
 
Thanks ppl for the quick help. The reason to do it in PHP is because I needed to do some other things with the manipulated date in PHP.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top