Page 1 of 1

timestamp_from_string conversion warnings

Posted: Thu Oct 07, 2010 11:50 pm
by suresh_dsx
Hi,

In the transformer stage, I am getting the following warning message: TransformerStage 0: Conversion error calling conversion routine timestamp_from_string data may have been lost

Source column name: FutureDate
Data type:Varchar (10) - nullable-YES
Sample data:

'1999-12-31'
'1995-10-25'


As per the below reference link, I have modified the code and it is working fine in one environment.
But when I run same in another environment, I am facing the above warning message.

viewtopic.php?t=135790&highlight=timest ... +been+lost

If Trim(NullToEmpty(link.FutureDate)) = '' Then
''
Else

StringToTimestamp(link.FutureDate : '-00-00-00', '%yyyy-%mm-%dd-%hh-%nn-%ss')

Output column: Futuredate
DataType: Timestamp Length(23) Scale(3). -Nullable -NO
Sample data:

'1999-12-31 00:00:00'
'1995-10-25 00:00:00'

Any help greatly appreciated,

Regards,
SuRi

Posted: Fri Oct 08, 2010 1:51 am
by ArndW
I wonder if it might be an implicit string conversion in the transform stage. If you use the value "-12-30-30" for your time component, is your output correct or still 00:00:00?

Posted: Fri Oct 08, 2010 4:11 am
by suresh_dsx
i have got the work around on this. Now it looks fine.

Added a stage vaiable and placed the logic then used the stage variable in the derivation column. Now i am not getting the warning.


Thanks
SuRi