RE: given day of the year.

  • From: "Jacques Kilchoer" <Jacques.Kilchoer@xxxxxxxxx>
  • To: <sjaffarhussain@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 15 Feb 2005 12:07:39 -0800

You can also use the DDD date format.

SQL> select to_date ('1', 'DDD') as first_of_year,
  2     to_date ('2', 'DDD') as second_of_year,
  3     to_date ('100', 'DDD') as hundredth_of_year
  4  from dual ;

FIRST_OF_YEAR        SECOND_OF_YEAR       HUNDREDTH_OF_YEAR
-------------------- -------------------- --------------------
 2005/01/01 00:00:00  2005/01/02 00:00:00  2005/04/10 00:00:00


-----Original Message-----
Jaffar_DBA

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.
--
//www.freelists.org/webpage/oracle-l

Other related posts: