MySQL Forums
Forum List  »  Microsoft SQL Server

Re: Selecting Dates
Posted by: Roland Bouman
Date: January 26, 2006 09:21AM

Quick and dirty:

CURRENT_DATE() -1 for a date,

CURRENT_TIMESTAMP() - 1 for a datetime.

Nice and crisp:

SUBDATE(CURRENT_DATE(),1) for a date,

SUBDATE(CURRENT_TIMESTAMP(),1) for a datetime.



see: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

Options: ReplyQuote


Subject
Written By
Posted
January 24, 2006 02:35PM
Re: Selecting Dates
January 26, 2006 09:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.