Hi,
Am trying to convert the char field to time field in transformer stage.
The char field data format is hh:nn:ss.N
Eg: 00:00:09.2570000
I need the same value in target column "00:00:09.2570000" with datatype as time
If I directly change the data type to time in target column with length 16 and scale 7, am not getting the milliseconds part. Am only getting "00:00:09"
I tried below option
stringtotime('Columnname',"hh%nn%ss.n")
Kindly help
Thanks
Convert string to time with milliseconds
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 2
- Joined: Fri Jan 04, 2013 5:53 am
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
First things first, did you try to search your issue ?
There are atleast hundreds of posts with exactly same issue.
Even then, try this
Also enable the microseconds at the metadata level in the transformer.
There are atleast hundreds of posts with exactly same issue.
Even then, try this
Code: Select all
StringToTime('Columnname',"hh%nn%ss.6")
Thanx and Regards,
ETL User
ETL User
-
- Participant
- Posts: 2
- Joined: Fri Jan 04, 2013 5:53 am
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
What is your Target , is it Database or file ?SakthiSahithi wrote:Yes. I tried many options and none of them worked... All are skipping the milliseconds part
As specified by Chandra , you can use StringToTimestamp('Columnname',"hh%nn%ss.3") will work.
Enable Extended propery to "milliseconds"
if your target is database, then you need to check your DSN properties.