Page 1 of 1

Please help StringToTimestamp

Posted: Tue Aug 28, 2007 10:35 pm
by tini
I support to convert a string with varchar (17) and the data looks like 20070111124536777.
I need convert it to timestamp yyyy-mm-dd hh:nn:ss.
could someone help me please. Please give me the syntax too.
Thank you for your help

Posted: Tue Aug 28, 2007 10:59 pm
by ArndW

Code: Select all

StringToTimeStamp(In.Col,'%yyyy%mm%dd%hh%nn%ss')
and Bob's your uncle as some Yorkshire friends of mine are prone to saying.

Posted: Wed Aug 29, 2007 1:17 am
by ray.wurlod
Version 4 parallel job? Really? :shock:

Posted: Wed Aug 29, 2007 2:11 pm
by tini
ray.wurlod wrote:Version 4 parallel job? Really? :shock:
oop! version 7.1 not 4x.
sorry

Posted: Sun Nov 18, 2007 9:46 pm
by tini
If I try the code on 7.1 then it works without warning. but Try on version 7.5 then we get the error
Warning:--Input_file,0: Conversion error calling conversion routine timestamp_from_string data may have been lost
do you know why? thanks

Posted: Sun Nov 18, 2007 11:09 pm
by ray.wurlod
You have more digits than are required (that is, your string includes fractional seconds, but your date format string does not).