Page 1 of 1

Unable to load time stamp

Posted: Wed Aug 14, 2013 9:30 am
by sriec12
Hello Good Morning !!

I am receiving a Time stamp in char format 2013071820209386.....I need to load all the 16 bytes......


I am using StringToTimestamp(date,"%yyyy-%mm-%dd %hh:%nn:%ssss")

Error: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%yyyy-%mm-%dd %hh:%nn:%ssss" for conversion "timestamp=timestamp_from_string[%yyyy-%mm-%dd %hh:%nn:%ss](string)": APT_Conversion_String_TimeStamp: Invalid format [%yyyy-%mm-%dd %hh:%nn:%ssss] used for string_from_time type conversion. [api\operator_rep.C:3828]


I am able to load using StringToTimestamp(date,"%yyyy-%mm-%dd %hh:%nn:%ss") but when i try to load last 2 bytes its give me an error

Posted: Wed Aug 14, 2013 9:33 am
by chulett
Your format string needs to match the incoming data. Since your incoming string does not have dashes or spaces or colons in it, remove them from the format you are specifying. It's all about what it is, not what you want it to be.

Posted: Wed Aug 14, 2013 11:18 am
by sriec12
chulett Thanks for replying....

I changed input string into StringToTimestamp(date,"%yyyy-%mm-%dd %hh:%nn:%ssss") ......


Now i want to load all 4 bytes into seconds position....... is it possible ?

If so in place of %ssss what should i keep

Posted: Wed Aug 14, 2013 1:05 pm
by chulett
Please reread my response... pay particular attention to the 'remove them' part.