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

Function --- One day Less than Today

Status
Not open for further replies.

vechalapu

Programmer
May 2, 2001
58
US
Hi,

Is there any function I can use to select records one day less than CURRENT_DATE in DB2? I would like to retrive records loaded one day before than that day in a DB2 SQL Query.

Thanks in advance.
 
Hi,

(CURRENT DATE - 1 DAY) will return the previous date - just use this expression in the predicate of your select statement. eg.

SELECT * FROM table_x WHERE date_column > (CURRENT DATE - 1 DAY)

Regards,

Mike.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top