Datastage Timestamp field into Oracle Date field

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
anudeepdasari001
Participant
Posts: 58
Joined: Mon Dec 14, 2015 3:16 pm
Location: Arizona

Datastage Timestamp field into Oracle Date field

Post by anudeepdasari001 »

Is there any way to load the Timestamp field from datastage into Oracle Date field.
anudpETL
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure, seeing as how an Oracle DATE is actually a timestamp, i.e. carries a time portion. Do you want the time from the timestamp in the DATE? Does your source include milliseconds?

I'm not sure any more if an implicit conversion would work (been too long), the most 'compatible' / universal way would be to convert the timestamp to a string and then use a TO_DATE() function with a matching format string as part of the target DML. I always stick with an ISO timestamp for that, FWIW.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply