Page 1 of 1

String to Timestamp conversion

Posted: Wed Dec 15, 2010 5:25 am
by agathaeleanor
I have gone through the forum topic posted for topic string to timestamp conversion. Knew that I should follow the source data format,

input data: 20100801093010
derivation: StringToTimestamp(Trim(Lnk_InValidation.TIMESTAMP),"%yyyy%mm%dd%hh%nn%ss")

I am still getting error,
Data string '20100801093010' does not match format '%yyyy-%mm-%dd %hh:%nn:%ss': an integer was expected to match tag %nn.

Need your help in this matter.

Posted: Wed Dec 15, 2010 6:34 am
by chulett
I'm unclear how you can be saying that you are using "%yyyy%mm%dd%hh%nn%ss" in your function call and yet the error message shows "%yyyy-%mm-%dd %hh:%nn:%ss"... can you double-check, please? :?

Posted: Wed Dec 15, 2010 6:31 pm
by agathaeleanor
Yes, confirmed that error message is expecting format '%yyyy-%mm-%dd %hh:%nn:%ss'

However, right before the error message, there is a warning saying,

SEQ_LU_ROUTE: When validating import schema: Unrecognized top level format property: timestamp_format="%yyyy-%mm-%dd %hh:%nn:%ss"

Would this cause by any setting in the sequential file?

Posted: Thu Dec 16, 2010 9:05 am
by manoj_23sakthi
chulett wrote:I'm unclear how you can be saying that you are using "%yyyy%mm%dd%hh%nn%ss" in your function call and yet the error message shows "%yyyy-%mm-%dd %hh:%nn:%ss"... can you double-check, please? :?
convert string to timestamp

Posted: Thu Dec 16, 2010 7:41 pm
by agathaeleanor
This has been resolved when i found that the reject link is expecting a timestamp. When i change the datatype to varchar in reject link, it works fine.