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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: given day of the year.

RE: given day of the year.

From: David Kurtz <info_at_go-faster.co.uk>
Date: Tue, 15 Feb 2005 19:40:44 -0600
Message-ID: <CKEAJBMGFEOCDBFILPJDCENAFKAA.info@go-faster.co.uk>


Remember to subtract 1 - 1st of January is the first day of the year, not the zeroth.
So the 100th day of the current year is:

alter session set nls_date_format = 'HH24:MI:SS DD/MM/YYYY'; select trunc(sysdate,'yyyy')+100-1 from dual /

TRUNC(SYSDATE,'YYYY



00:00:00 10/04/2005

regards



David Kurtz
Go-Faster Consultancy Ltd.
tel: +44 (0)7771 760660
fax: +44 (0)7092 348865
web: www.go-faster.co.uk

mailto:david.kurtz_at_go-faster.co.uk
Book: PeopleSoft for the Oracle DBA: http://www.psftdba.com PeopleSoft DBA Forum: http://groups.yahoo.com/group/psftdba

> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Mercadante, Thomas F
> Sent: 15 February 2005 07:03
> To: 'sjaffarhussain_at_gmail.com'; oracle-l_at_freelists.org
> Subject: RE: given day of the year.
>
>
> Jaffar,
>
> Try
>
> select to_date('0101'||to_char(sysdate,'yyyy'),'mmddyyyy') + 100 from dual
>
> Tom
>
> -----Original Message-----
> From: Jaffar_DBA [mailto:sjaffarhussain_at_gmail.com]
> Sent: Tuesday, February 15, 2005 7:45 AM
> To: oracle-l_at_freelists.org
> Subject: given day of the year.
>
> Hello list,
>
> Could any one give me the script or sql for the following requirements:
>
> If I need to know the 100th day of this year, like, If I pass value
> 100, want to extract the 100th day of the given year. Sunday 21,
> March, 2005. something like that.
>
>
>
> --
> Best Regards,
> Jaffar, OCP DBA
> Banque Saudi Fransi
> Saudi Arabia
>
>
> ------------------------
> It is your atittude,
> not your aptitude
> that determins your ultitude....
> --
> http://www.freelists.org/webpage/oracle-l
> --
> http://www.freelists.org/webpage/oracle-l
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 15 2005 - 20:49:19 CST

Original text of this message

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