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: Week numbers and days

Re: Week numbers and days

From: Valery V. Tsekhmister <valery_tsekhmister_at_hotmail.com>
Date: Sun, 9 Feb 2003 18:22:06 +0300
Message-ID: <b25v61$7gm$1@slim.sovintel.ru>


My apologies. To make this example to work properly, I forgot to add "trunc" function, as follows:

 select next_day(
 TRUNC(to_date(substr('200306',1,4),'YYYY'),'YYYY')+ /* This starts counting from 1 of January */
 (substr('200306',5,2)-1)*7
 ,'WEDNESDAY') from dual

Regards !
Valery.

"Valery V. Tsekhmister" <valery_tsekhmister_at_hotmail.com> wrote in message news:b2083o$ev1$1_at_slim.sovintel.ru...
> Hi Chris !
>
> It's only one pill needed to perform such a conversion:
>
> select next_day(
> to_date(substr('200306',1,4),'YYYY')+
> (substr('200306',5,2)-1)*7
> ,'WEDNESDAY') from dual
>
>
> Regards.
>
> Valery
>
>
> "Chris Kruiper" <c.a.kruiper_at_home.nl> wrote in message
> news:mcL0a.1237507$xm4.48152766_at_Flipper...
> > Hi,
> >
> > I want to know the following:
> >
> > I have a week number in a certain year (format YYYYWW) I want to know
what
> > date is the wednesday in that week.
> >
> > Example:
> > Year/week: 200306
> > Day wednesday
> >
> > Date: 20020205
> >
> > Anyone an idea how I can do this from sql?
> >
> > Thank you,
> >
> > Chris
> >
> >
>
>
Received on Sun Feb 09 2003 - 09:22:06 CST

Original text of this message

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