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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Last_Day...but is there a First_Day?

Re: Last_Day...but is there a First_Day?

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: Sun, 26 Sep 1999 18:55:14 -0400
Message-ID: <Jb8gEAAmOq73EwdP@ahardy.demon.co.uk>


In article <7sjjhb$if6$1_at_nnrp1.deja.com>, ramsey84_at_my-deja.com writes
>Does anyone know the best way to return the first day of the month for
>a date field. For instance if
>
>15:37:40 SQL> select last_day(sysdate) from dual;
>
>LAST_DAY(
>---------
>30-SEP-99
>
>how would I get the output to be 01-SEP-99, instead? TIA!
>

select trunc(sysdate, 'MONTH') from dual;

Andy
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

--
Andy Hardy. PGP key available on request


Received on Sun Sep 26 1999 - 17:55:14 CDT

Original text of this message

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