user3892321
user3892321

Reputation: 11

Previous day function

Is there a function for previous day in discoverer/oracle? I need to run a daily report for data through the previous day. I was hoping there is a formula using system date -1, but I haven't been able to find anything to help.

Upvotes: 1

Views: 80

Answers (1)

Dan Bracuk
Dan Bracuk

Reputation: 20804

You are very close

select trunc(sysdate) -1 yesterday
from dual

trunc() strips out the time portion. You could also put the -1 inside the brackets if you want. The results will be the same.

Upvotes: 1

Related Questions