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
-
abhilashnair
- Participant
- Posts: 284
- Joined: Fri Oct 13, 2006 4:31 am
Post
by abhilashnair »
My input is string and data will be like dd-Mon-yyyy
eg: 10-Dec-2010
I need to load the above as timestamp into target Teradata table
Please suggest
-
sarathchandrakt
- Participant
- Posts: 50
- Joined: Fri Aug 29, 2014 1:32 pm
- Location: Mumbai
Post
by sarathchandrakt »
You can just append 00:00:00 to the existing string
input.Column_Name:' 00:00:00'
Then use StingToTimestamp() function to convert it to timestamp
StringToTimestamp(input.column_name:' 00:00:00', "%dd-%mmm-%yyyy %hh:%nn:%ss")
-
ray.wurlod
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
-
Contact:
Post
by ray.wurlod »
What format of timestamp is your Teradata instance expecting?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
abhilashnair
- Participant
- Posts: 284
- Joined: Fri Oct 13, 2006 4:31 am
Post
by abhilashnair »
The target Teradata table is expecting Timestamp without microseconds
-
chulett
- Charter Member
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
Sorry but that doesn't answer the question. What format is it expecting? Spell it out for us like YYYY-MM-DD HH... etc etc.
-craig
"You can never have too many knives" -- Logan Nine Fingers
-
abhilashnair
- Participant
- Posts: 284
- Joined: Fri Oct 13, 2006 4:31 am
Post
by abhilashnair »
StringToTimestamp(input.column_name:' 00:00:00', "%dd-%mmm-%yyyy %hh:%nn:%ss")
The above worked for me