Aug 1, 2007 #1 Olivia123 MIS Apr 19, 2007 29 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
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
Aug 2, 2007 #3 Beilstwh Programmer Jul 13, 2005 819 US 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 Upvote 0 Downvote
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