Welcome to WebmasterWorld Guest from 54.196.233.239

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Date Manipulation Question

     

sysdomatic

6:28 pm on Mar 2, 2005 (gmt 0)

10+ Year Member



Hi All,

I am currently using the NOW() variable in MySQL to generate a date that looks something like this:

2005-03-02 18:18:49

My question is, how do I create a time that is 5 hours in the past? The time zone is too far ahead, thanks in advance,

Dave

frizhard

7:49 pm on Mar 2, 2005 (gmt 0)

10+ Year Member



SELECT DATE_SUB(NOW(), INTERVAL 5 HOUR)

or easier

SELECT NOW() - INTERVAL 5 HOUR

Hope this helps =)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month