Page 1 of 1
while convert timespamp to string getting warnings
Posted: Mon Oct 26, 2009 12:20 am
by deesh
Hi Friends,
While changing from timespamp to string i am getting below warning and data showing null, i tried some ways but again and agin showing the same warning, can any one help in this solution.
APT_CombinedOperatorController(0),0: Data string '19971001' does not match format '%yyyy-%mm-%dd %hh:%nn:%ss': an integer was expected to match tag %dd.
Posted: Mon Oct 26, 2009 12:29 am
by gssr
Remove the %hh%mm%ss and try to execute
Posted: Mon Oct 26, 2009 12:52 am
by deesh
showing same message
gssr wrote:Remove the %hh%mm%ss and try to execute
Posted: Mon Oct 26, 2009 1:26 am
by gssr
are you trying to convert "Timestamp to String" or "String to Timestamp"..Can you able to read the data in the Source file??
![Confused :?](./images/smilies/icon_confused.gif)
Re: while convert timespamp to string getting warnings
Posted: Mon Oct 26, 2009 1:50 am
by ArndW
Try "StringToTimeStamp(In.column:" 00:00:00","%YYYY%MM%DD %HH:%NN:%SS")
Re: while convert timespamp to string getting warnings
Posted: Mon Oct 26, 2009 2:49 am
by gssr
ArndW wrote:Try "StringToTimeStamp(In.column:" 00:00:00","%YYYY%MM%DD %HH:%NN:%SS") ...
I think he want to convert Timestamp to String ""while convert timespamp to string getting warnings""
Re: while convert timespamp to string getting warnings
Posted: Mon Oct 26, 2009 2:49 am
by deesh
from TimestampToString
ArndW wrote:Try "StringToTimeStamp(In.column:" 00:00:00","%YYYY%MM%DD %HH:%NN:%SS") ...
Posted: Mon Oct 26, 2009 2:55 am
by gssr
Which function are you using..?
Try this TimestampToString(DATA,[%yyyy-%mm-%dd])
Posted: Mon Oct 26, 2009 5:24 am
by deesh
it's not working
gssr wrote:Which function are you using..?
Try this TimestampToString(DATA,[%yyyy-%mm-%dd])
Posted: Mon Oct 26, 2009 5:49 am
by ArndW
The syntax is wrong. Explain "not working", please and include the error message.
Posted: Mon Oct 26, 2009 5:54 am
by chulett
'19971001' is not a Timestamp.
Posted: Mon Oct 26, 2009 7:15 am
by deesh
When i use this
TimestampToString(LNK_CONV_TRANS2.SERVICE,"%yyyy-%mm-%dd") in Trnsformer showing below warning
APT_CombinedOperatorController(0),0: Data string '2009-11-01' does not match format '%yyyy-%mm-%dd %hh:%nn:%ss': the data string has fewer characters than expected.
chulett wrote:'19971001' is not a Timestamp. ...
Posted: Mon Oct 26, 2009 7:40 am
by ArndW
'2009-11-01' is a Date and cannot be converted to a timestamp they way you are writing it.
Try :
Code: Select all
TimestampToString(LNK_CONV_TRANS2.SERVICE:' 00:00:00',"%yyyy-%mm-%dd %hh:%nn:%ss")
Posted: Mon Oct 26, 2009 8:07 am
by chulett
But again, all that presupposes the input is
already a timestamp which this isn't. And the formatting mask in the TimestampToString function is what you want
the string to look like.
![Confused :?](./images/smilies/icon_confused.gif)