Reputation: 2248
I want to map a datetime mm/dd/yyyy hh24:mi:ss
attribute in flatfile to Teradata table date yyyy-mm-dd
attribute using informatica.
When I added to_date(date_field, 'yyyy-mm-dd')
I'm encountering oracle fatal error. When I tried with to_date(to_char(date_field, 'yyyy-mm-dd'))
it is giving invalid string input to to_date()
.
Can anyone help?
Upvotes: 0
Views: 18674
Reputation: 3516
In Informatica, the format that you specify under to_date()
function should be same as your source data format and not your target format.
So in your case, to_date function should be like this:
to_date (date_field, 'mm/dd/yyyy hh24:mi:ss')
This is because your flat file date has a format of mm/dd/yyyy hh24:mi:ss
(Ensure that all the records in this column in your flat file date are really in this format - else you will encounter error)
Do not worry about target date format as long as the target column is a date
datatype. By nature, date
datatype does not have a format, it's only the display that needs format.
Upvotes: 2