Conversion of Varchar(yymmdd) to timestamp
Posted: Fri Nov 23, 2007 7:23 am
Hi All,
In sequential file(source) ,one of the column is of varchar adatatype and sample data comimg is 071109 which represents 07 is year,11 is month ,09 is day.
The requirement is to load the above column data into oracle table and the dataype is timestamp in table.
Case: 1
Using ----StringToTimestamp('20':DSLink40.TODAYS_BUSINESS_DATE: " 00:00:00","%yyyy%mm%dd:%hh:%nn:%ss")---
Result :Th data is loading intpo table ,but it is not giving correct year when source data is 991109.
Case: 2
Using ----StringToTimestamp(DSLink40.TODAYS_BUSINESS_DATE: " 00:00:00","%yy%mm%dd:%hh:%nn:%ss")--- .
Result :Th data is loading into table but year is showing as 1907 when the source data is 071109.
Please suggest the correct way to load the source data
into table as timestamp.
In sequential file(source) ,one of the column is of varchar adatatype and sample data comimg is 071109 which represents 07 is year,11 is month ,09 is day.
The requirement is to load the above column data into oracle table and the dataype is timestamp in table.
Case: 1
Using ----StringToTimestamp('20':DSLink40.TODAYS_BUSINESS_DATE: " 00:00:00","%yyyy%mm%dd:%hh:%nn:%ss")---
Result :Th data is loading intpo table ,but it is not giving correct year when source data is 991109.
Case: 2
Using ----StringToTimestamp(DSLink40.TODAYS_BUSINESS_DATE: " 00:00:00","%yy%mm%dd:%hh:%nn:%ss")--- .
Result :Th data is loading into table but year is showing as 1907 when the source data is 071109.
Please suggest the correct way to load the source data
into table as timestamp.