Date conversion

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sumesh.abraham
Participant
Posts: 153
Joined: Thu May 11, 2006 1:52 am
Location: Bangalore

Date conversion

Post by sumesh.abraham »

Hi All,

I've a column with data type Timestamp. Please let me know how I can convert it into Oracle Date format (DD-MON-YYYY]

Thanks,
Sumesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What does your data look like coming in?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why do you want to? Surely if you convert it to a Date data type that's all you need to do. The Oracle Enterprise stage will accept a Date data type and process it properly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sumesh.abraham
Participant
Posts: 153
Joined: Thu May 11, 2006 1:52 am
Location: Bangalore

Post by sumesh.abraham »

The data type has been specified as Timestamp in the input data set and I need to write it to an Oracle table which has a column with Timestamp data type.

e.g. The value in the data set is 2007-10-10. My understanding says Oracle expects the above date in the format 10-OCT-2007 and without converting it to the expected format, the insert will not happen.Am I correct? If yes, I want to convert into the Oracle date format before writing to the table. How can I do this in the derivation.

Do you mean to say, the insert will happen if I make the target column data type as Date. Please clarify.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's exactly what I mean to say. You could even leave it as Timestamp. They're the same to Oracle. You only need to worry about format if you are supplying string data and applying a TO_DATE function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply