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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql now() question 1

Status
Not open for further replies.

TGJ

Programmer
Jan 31, 2005
64
CA
I would like to know how i can manipulate the now() command to make it actually mean yesterday.

basically I need now() - 1day

Is there some way I can achieve this? perhaps now() is not the proper function to use, any help is much appreciated.
 
You could use:[tt] NOW() - INTERVAL 1 DAY[/tt]

NOW() returns the current date and time. To get the current date, you can use CURDATE() .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top