Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: given day of the year.
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
regards
tel: +44 (0)7771 760660 fax: +44 (0)7092 348865 web: www.go-faster.co.uk
> -----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-lReceived on Tue Feb 15 2005 - 20:49:19 CST
![]() |
![]() |