How to calculate end of day?

There are few ways to calculate end of day i.e when the time is 23:59:59. In the example below it will return a value a value of 01-APR-2009 23:59:59.

to_date(’01-APR-2009′) + 1 – 1/86400
to_date(’01-APR-2009′) + 0.99999
to_date(’01-APR-2009 23:59:59′, ‘DD-MON-YYYY HH24:MI:SS’)
trunc(sysdate) + 0.99999 – end of today

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s