Page 2 of 2

Posted: Wed Nov 04, 2009 3:18 pm
by kumar_s
Did you try StringToTimestamp(DSLink4.time,"%yyyy%mm%dd%hh.%mm.%ss %aa")?

Posted: Wed Nov 04, 2009 3:18 pm
by Kryt0n
How is "yyyymmddhh.mm.ss am" the same as below?
satishm wrote: StringToTimestamp(DSLink4.time,"%yyyy%mm%dd %hh.%nn.%ss %aa")

Posted: Wed Nov 04, 2009 3:26 pm
by kumar_s
Okie, just saw your parallel post for my late question.

Posted: Wed Nov 04, 2009 3:26 pm
by satishm
kumar_s wrote:Did you try StringToTimestamp(DSLink4.time,"%yyyy%mm%dd%hh.%mm.%ss %aa")? ...
yeah..I tried but job got aborted.see error in my prvious post..

Posted: Wed Nov 04, 2009 3:48 pm
by chulett
%hh is a 24 hour format, you'd need to use %H or %HH for 12 hour, depending on if the length of that portion is variable (1...12) or fixed (01...12) in size.

Posted: Wed Nov 04, 2009 4:34 pm
by Kryt0n
chulett wrote:%hh is a 24 hour format, you'd need to use %H or %HH for 12 hour, depending on if the length of that portion is variable (1...12) or fixed (01...12) in size. ...
Which, of course, the help files explain

Posted: Wed Nov 04, 2009 4:44 pm
by chulett
Of course. That and so much more. :wink:

Posted: Wed Nov 18, 2009 6:16 pm
by newtier
satishm wrote:
satishm wrote:
chulett wrote:What solution did you use - all that extra work using stage variables or the proper StringToTimestamp function syntax that Kryt0n helped out with? ...
One which Neena provided, as i dont wanna store am/pm in table and also wanna store it in 24 hrs format..
She provided a perfect solution.

But thanks to all for all the help.

Ran the job using

StringToTimestamp(DSLink4.time,"%yyyy%mm%dd %hh.%nn.%ss %aa")

got aborted with following error
APT_CombinedOperatorController,0: Unrecognized timestamp format identifier: %97
APT_CombinedOperatorController,0: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%yyyy%mm%dd %hh.%nn.%ss %aa" for conversion "timestamp=timestamp_from_string[%yyyy-%mm-%dd %hh:%nn:%ss](string)": APT_Conversion_String_TimeStamp: Invalid Format [%yyyy%mm%dd %hh.%nn.%ss %aa] used for string_from_time type conversion.
Operator signalled one or more errors.

Looking at your "actual" input data ... is there a space between the day and hour? (your format looks like you have a space there)