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

DATES

Status
Not open for further replies.

Olivia123

MIS
Apr 19, 2007
29
0
0
US
Hello,
How can I in this sql script subtract 7 days from the DATE_CREATED.

SELECT * FROM F_ACCOUNTS

WHERE TRUNC(date_created) = (SELECT TRUNC(MAX (date_created)) FROM F_ACCOUNTS)

Thank you

 
You can use arithmetic on dates. For example to subtract seven days do

date_created - 7

To go back 1 day and 5 hours do

date_created - (1 + (5/24))



Bill
Oracle DBA/Developer
New York State, USA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top