Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: last day/time
You can do something like this:
SELECT last_day(sysdate)+(60*60*24-1)/(60*60*24) FROM dual
The last_day function returns the last day of the month for any given date. The number part is just a fraction of a day. Thats 60 seconds times 60 minutes times 24 hours for a whole day. If you subtract one and divide it by a whole day you get 23:59:59.
-Peter
On Thu, 11 May 2000, Nick G. Anagnos wrote:
> need a statement that will assign a variable the last day and
> time(23:59) based on the month the sql statement was run.
>
> ex. If the sql statement is run in May, 2000, assign 05/31/2000 23:59
> to a variable
>
>
>
>
Received on Fri May 12 2000 - 00:00:00 CDT