Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help with my to_date function

Re: Help with my to_date function

From: cc <chris.colclough_at_nospam.jhuapl.edu>
Date: Mon, 2 Oct 2006 09:48:47 -0400
Message-ID: <efr5c2$i8h$2@aplcore.jhuapl.edu>


declare
aresult varchar2(10);
begin
select case when to_number(substr('&strdt',1,2)) <= 7 then '20'||'&strdt'
else '19'||'&strdt'
end
into aresult
from dual;
dbms_output.put_line ('result is: ' || aresult); end;

<emdproduction_at_hotmail.com> wrote in message news:1159794906.392366.237550_at_m7g2000cwm.googlegroups.com...
> Group,
>
> I need to change a string of 6 in the format of 'yymmdd' to date. If
> yy< 07, i need to put 20 in front of it. If yy<07, I need to put 19 in
> front of it.
>
> So,
> 040102 needs to be 20040102
> while
> 320102 needs to be 19320102.
>
> Thanks for your help.
>
Received on Mon Oct 02 2006 - 08:48:47 CDT

Original text of this message

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