date conversion

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
narayanavagu
Participant
Posts: 13
Joined: Tue Nov 15, 2005 2:38 pm
Contact:

date conversion

Post by narayanavagu »

I have a data in flat files containing only one column of type char(10) in the following format yyyy-mm-dd.

i want to transfor it into oracle thru odbc in the oracle specified date format (dd-mon-yy).

plz any body give the conversion code
Venkata Narayana Vagu,
DW Developer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In the SDK routines there is a class of routines for converting to the expected date format for a number of different databases. You should be able to use one of these without reinventing the wheel. Open the routine and read the documentation (yes, they are documented!), to work out how to invoke them.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dssiddu
Participant
Posts: 66
Joined: Mon Nov 07, 2005 10:28 pm
Contact:

Use Conv Funs

Post by dssiddu »

hi

u have to use ICONV And OCONV functions.

Oconv(Iconv(Date Field,E)

By this u can get the req format.....

Check it out
dssiddu
Participant
Posts: 66
Joined: Mon Nov 07, 2005 10:28 pm
Contact:

Use Conv Funs

Post by dssiddu »

hi

u have to use ICONV And OCONV functions.

Oconv(Iconv(Date Field,E)

By this u can get the req format.....

Check it out
suresh.narasimha
Premium Member
Premium Member
Posts: 81
Joined: Mon Nov 21, 2005 4:17 am
Location: Sydney, Australia
Contact:

Re: date conversion

Post by suresh.narasimha »

narayanavagu wrote:I have a data in flat files containing only one column of type char(10) in the following format yyyy-mm-dd.

i want to transfor it into oracle thru odbc in the oracle specified date format (dd-mon-yy).

plz any body give the conversion code

Hi

Type D CODE in help ,You can get all the required date conversions

you can try this Oconv(Iconv(DateField,"D-YMD(4,2,2),"D-DMY[,A3,2]")
SURESH NARASIMHA
jagadish25
Participant
Posts: 4
Joined: Mon Nov 14, 2005 1:48 pm

hi

Post by jagadish25 »

hi vagu, u dont know about this.
i think all the oconv and iconv was explained bye kamal.
ok
how is our team
bye
Post Reply