views:

436

answers:

2

Hi,

I am using Informatica 8.1.1. Source flat file contains one date/time field. I want to load it as two separate columns date and time in target table. I tried TO_DATE function to get the date and time separately. But it is giving some errors.

How can I split this date/time into date and time? or Can we load a string value from source flat file into a date value in target table?

A: 

Read the help section on the GETDATEPART function

A: 

hi,

You could use the following to load the flat file:

For the date field: to_char(get_date_part(in_date,'YYYY'))||to_cha r(get_date_part(in_date,'MM'))||to_char(get_date_pa rt(in_date,'DD'))

For the time field: to_char(get_date_part(in_date,'HH24'))||to_cha r(get_date_part(in_date,'MI'))||to_char(get_date_pa rt(in_date,'SS'))

jagan