Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: last day/time

Re: last day/time

From: Peter Connolly <peter_at_wpi.edu>
Date: 2000/05/12
Message-ID: <Pine.OSF.4.21.0005120113190.1138-100000@ernie.WPI.EDU>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US