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!

Date interval syntax? 1

Status
Not open for further replies.

petersJazz

Programmer
Jan 28, 2002
222
EU
How do you get today - 10 days in SQL on AS/400?

I tried this syntax:

select *
from table
where regdate > current_date - interval '10' days(5);
 
current timestamp - 10 days will get you what you want.
 
Actually, to be completely accurate you should code

date(current timestamp - 10 days )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top