Hi Experts,
I am having a string value as "20130305 07:41:45.798181", need to convert into timestamp.
I have used
StringToTimestamp(<Column Name > , yyyy%mm%dd %hh:%nn:%s:%SSSSSS,v")
.But throwing error. Kindly help me to fix this.
Thanks In advance.
Ramesh
Date Time YYYYMMDD HH:NN:SS:SSSSSS format
Moderators: chulett, rschirm, roy
Date Time YYYYMMDD HH:NN:SS:SSSSSS format
Ramesh Kumar.M
It's helpful to include the error message you received. Without it, the forum members are left to guess or assume.
One thing to point out: Your example string data has a decimal point between the seconds and microseconds ("45.798181"), but your format string has a semicolon between the seconds and microseconds ("%s:%SSSSSS,v"). Perhaps that is part of the problem? As always, refer to the documentation for format string guidance.
Regards,
One thing to point out: Your example string data has a decimal point between the seconds and microseconds ("45.798181"), but your format string has a semicolon between the seconds and microseconds ("%s:%SSSSSS,v"). Perhaps that is part of the problem? As always, refer to the documentation for format string guidance.
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.
Thanks a lot jwiles
Please find the more detail.
Now i have tried for the date "20130102 16:40:40.84282" as
StringToTimestamp(Field(in.Timestamp,'-',1),"%yyyy%mm%dd %hh:%nn:%ss.6")
Now the error message is
Transformer_18,1: Data string '"20130102 16:40:40.84282' does not match format '%yyyy%mm%dd %hh:%nn:%ss.6': an integer was expected to match tag %yyyy.
Please help me...
Now i have tried for the date "20130102 16:40:40.84282" as
StringToTimestamp(Field(in.Timestamp,'-',1),"%yyyy%mm%dd %hh:%nn:%ss.6")
Now the error message is
Transformer_18,1: Data string '"20130102 16:40:40.84282' does not match format '%yyyy%mm%dd %hh:%nn:%ss.6': an integer was expected to match tag %yyyy.
Please help me...
Ramesh Kumar.M
Sorry, but why? They don't want to lose the time component and the mask you provided doesn't match the incoming string.raju4u wrote:StringToTimestamp(DateToString(DSLink2.d1,"%yyyy-%mm-%dd"):' 00:00:00.000000',"%yyyy-%mm-%dd %hh:%nn:%ss.6")
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers