Page 1 of 1

Timestamp conversion error

Posted: Fri May 17, 2013 2:28 pm
by suja.somu
Source is csv file with the data format as 3/30/2013 09:04:05, reading as varchar(26) . Target is sql server database with datetime datatype .

function used
StringToTimestamp(Lnk_MapTargetColumns.Date_Received,"mm/%dd/%yyyy %hh:%nn:%ss")

getting the below error:
APT_CombinedOperatorController,1: Caught exception from runLocally(): APT_ParseError: Parsing parameters "mm/%dd/%yyyy %hh:%nn:%ss" for conversion "timestamp=timestamp_from_string[%yyyy-%mm-%dd %hh:%nn:%ss](string)": APT_Conversion_String_TimeStamp: Invalid format [mm/%dd/%yyyy %hh:%nn:%ss] used for string_from_time type conversion.

What is the error in the above function used

Posted: Fri May 17, 2013 4:34 pm
by BradMiller
Your main problem is that you are missing the "%" in front of the mm.

Posted: Mon May 20, 2013 11:32 am
by priyadarshikunal
% you have to put in before mm as suggested. However i noticed that its one digit month without filler. You might wanna try %m/%d....