source timestamp to target timestamp using iconv,oconv

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
kirankumarreddydesireddy
Participant
Posts: 110
Joined: Mon Jan 11, 2010 4:22 am

source timestamp to target timestamp using iconv,oconv

Post by kirankumarreddydesireddy »

I have source as timestamp i.e 'YYYY-MM-DD HH24:MI:SS' and I need to load into Oracle target table as timestamp.

I have used oconv and iconv functions

Oconv(Iconv(MODIFYDATE,'D-YMD','D-YMD')

when input is '2010-11-16 14:24:36'

The above gives me output as '2010-11-16 00:00:00' .

Is there any way so that I can capture the exact '2010-11-16 14:24:36' also in the target instead '2010-11-16 00:00:00'
Thanks
Kiran
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. My initial thought is that you don't need to do anything - the source is already in the correct format for Oracle.

If you are going to use Oconv() and Iconv() you need first to segregate the date and time portions, perhaps using Field() functions or substrings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kirankumarreddydesireddy
Participant
Posts: 110
Joined: Mon Jan 11, 2010 4:22 am

Post by kirankumarreddydesireddy »

Thanks Ray.


Thanks
Kiran
Post Reply