| Date Manipulation Question
|
sysdomatic

msg:1308038 | 6:28 pm on Mar 2, 2005 (gmt 0) | 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

msg:1308039 | 7:49 pm on Mar 2, 2005 (gmt 0) | SELECT DATE_SUB(NOW(), INTERVAL 5 HOUR) or easier SELECT NOW() - INTERVAL 5 HOUR Hope this helps =)
|
|
|