Page 1 of 1

source timestamp to target timestamp using iconv,oconv

Posted: Wed Nov 17, 2010 3:10 am
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

Posted: Wed Nov 17, 2010 3:36 am
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.

Posted: Wed Nov 17, 2010 5:13 am
by kirankumarreddydesireddy
Thanks Ray.


Thanks
Kiran