DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
jpraveen
Participant



Joined: 06 Jun 2009
Posts: 70
Location: HYD
Points: 735

Post Posted: Tue Apr 18, 2017 10:27 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
Hi

I have a problem while i convert to string to Time.

my source is Flat file(fixed width) and need to load data into table(teradata)

The data for Time column from File is like

10:21:15
09:06:58
12:45:06

etc.,
I am generating some random numbers like 000001,123466,001523, etc.,

Now i need to append some random 6 digit numbers as micro seconds and try to load data into table ( column metadata as TIME(6) )

So , i have concatenated as 10:21:15 123456

But while the data is loaded the result in table as showing 10:21:15.000000

Is there any function like stringtotime(incol1,"%hh %mm %ss.s6") or esle anything..stringtotime(incol1,"%hh %mm %ss.s(6)")

I am sure there is no function like above

is i am missing the basics ?

Kindly suggest ..

Thank you

_________________
Jaypee
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42097
Location: Denver, CO
Points: 216080

Post Posted: Tue Apr 18, 2017 11:23 am Reply with quote    Back to top    

Shouldn't you be using a "dot" between them rather than a space? Also ensure you have enabled Microseconds in the extended properties for that column.

_________________
-craig

Can't keep my eyes from the circling skies
Tongue tied and twisted just an earth bound misfit, I
Rate this response:  
Not yet rated
jpraveen
Participant



Joined: 06 Jun 2009
Posts: 70
Location: HYD
Points: 735

Post Posted: Tue Apr 18, 2017 9:50 pm Reply with quote    Back to top    

Yes added 'dot' and Time(15,6)

Still the data is like '10:26:38.000000' in Table

Convserion :- StringToTime(InputCol,"%hh:%nn:%ss")

My input is '10:26:38.123456', but how to get micro seconds ?

_________________
Jaypee
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42097
Location: Denver, CO
Points: 216080

Post Posted: Wed Apr 19, 2017 6:04 am Reply with quote    Back to top    

Since you didn't mention it, what about the extended properties - was that something you were able to set?

Also note that, once that is set, your conversion should be StringToTime(InputCol,"%hh:%nn:%ss.6")

_________________
-craig

Can't keep my eyes from the circling skies
Tongue tied and twisted just an earth bound misfit, I
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours