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.
Conversion of Varchar(yymmdd) to timestamp
Moderators: chulett, rschirm, roy
Re: Conversion of Varchar(yymmdd) to timestamp
For Case 1:-
---- If you are sure that all your dates are of this century then your first transform will work correctly but I think there are spaces coming in the input column due to which its giving the wrong answer. So just use the following transform
StringToTimestamp('20':Trim(DSLink40.TODAYS_BUSINESS_DATE): " 00:00:00","%yyyy%mm%dd %hh:%nn:%ss")
For Case 2
--- Can you please check the value of CENTURYPIVOT in uvconfig file. Although this value is basically for ICONV but since I am not currently having a PX installation so can't check whether this effects the StringToTimestamp function as well.
----------
dsusr
---- If you are sure that all your dates are of this century then your first transform will work correctly but I think there are spaces coming in the input column due to which its giving the wrong answer. So just use the following transform
StringToTimestamp('20':Trim(DSLink40.TODAYS_BUSINESS_DATE): " 00:00:00","%yyyy%mm%dd %hh:%nn:%ss")
For Case 2
--- Can you please check the value of CENTURYPIVOT in uvconfig file. Although this value is basically for ICONV but since I am not currently having a PX installation so can't check whether this effects the StringToTimestamp function as well.
----------
dsusr