I am having source data format as yyyymmdd which is of integer type(Eg:20070728).I have to convert it in to Date format and load in Oracle table.The column is "date" type in Oracle.
This is a Parallel Job.
Please advise
How to convert 20070625 to Date Format(mm/dd/yyyy) in PX
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 21
- Joined: Tue Apr 24, 2007 12:39 am
How to convert 20070625 to Date Format(mm/dd/yyyy) in PX
Shadab Farooque
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
Re: How to convert 20070625 to Date Format(mm/dd/yyyy) in PX
Date datatype in Oracle is "TimeStamp" for DataStage.So you would have to convert your input interger value into a TimeStamp.Shadab_Farooque wrote:I am having source data format as yyyymmdd which is of integer type(Eg:20070728).I have to convert it in to Date format and load in Oracle table.The column is "date" type in Oracle.
You can use the substring funtion - and then convert the formatted into a Timestamp using the StringToTimestamp function after appending a time component (say 00:00:00) to your date.
Aneesh
------------------
Aneesh
Aneesh
Read the integer as character by specifying TO_CHAR() in the sql select and then in the transformer provide the following
Code: Select all
StringToDate(in.Date, "%yyyy%mm%dd")
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 21
- Joined: Tue Apr 24, 2007 12:39 am
-
- Participant
- Posts: 21
- Joined: Tue Apr 24, 2007 12:39 am