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: How to convert a year+week to a date ?

Re: How to convert a year+week to a date ?

From: James Lorenzen -XIOtech Corporation <jlorenzen_at_my-deja.com>
Date: Mon, 05 Feb 2001 15:08:56 GMT
Message-ID: <95mflv$rsu$1@nnrp1.deja.com>

Deepest:

   You might try this:
select to_date(substr(my_string_field,1,4) ||

   (substr(my_string_field,5,2)-1)*7,'YYYYDDD') from dual ;

This will take some adjusting to handle the beginning of the week for WW and IW formats, but it should get you started.

James

In article <981380148.833458_at_dedale.pandemonium.fr>,   "Deepest Blue" <no_at_where.com> wrote:
> I can't find the way to translate a year and week field to a date
> datatype with the WW or IW format.
> In my string field I have 6 characters like 200108 for week 8 of
> year 2001, how can I have the starting date for this week ?
> I tried to_date(my_string_field,'YYYYWW') with no success...
> I have Oracle 7.3.2.3.0.
>

Sent via Deja.com
http://www.deja.com/ Received on Mon Feb 05 2001 - 09:08:56 CST

Original text of this message

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