Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Week numbers and days
"Valery V. Tsekhmister" wrote...
> 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
Hi Valery,
not quite right, I think.
Maybe:
select next_day(to_date(substr('200306',1,4),'yyyy')+ to_number(substr('200306',5,2)-7),'WEDNESDAY') from dual;
will do it.
Nice weekend to everyone,
Guido
Received on Fri Feb 07 2003 - 06:14:45 CST