Conversion error
Moderators: chulett, rschirm, roy
Conversion error
Hi All,
I am getting the following error while converting the date
Transformer,0: Conversion error calling conversion routine date_from_string data may have been lost.
The input date column is char(10) and the format is dd/mm/yyyy.
In the transformer I am validating the input date and converting the date into yyyymmdd .the output date datatype is integer.
In transformer iam using
sv1:IsValid("Date", StringToDate(OutDate.DATE,"%dd/%mm/%yyyy"))
sv2:If (sv1 = @FALSE Or IsNull(OutDate.DATE) )Then -1 Else DateToString(StringToDate(OutDate.DATE,"%dd/%mm/%yyyy"),"%yyyy%mm%dd").
This variable sv2 is mapped to output Date column.
I am unable to find out the error.Please suggest me to resolve the warnings.
I am getting the following error while converting the date
Transformer,0: Conversion error calling conversion routine date_from_string data may have been lost.
The input date column is char(10) and the format is dd/mm/yyyy.
In the transformer I am validating the input date and converting the date into yyyymmdd .the output date datatype is integer.
In transformer iam using
sv1:IsValid("Date", StringToDate(OutDate.DATE,"%dd/%mm/%yyyy"))
sv2:If (sv1 = @FALSE Or IsNull(OutDate.DATE) )Then -1 Else DateToString(StringToDate(OutDate.DATE,"%dd/%mm/%yyyy"),"%yyyy%mm%dd").
This variable sv2 is mapped to output Date column.
I am unable to find out the error.Please suggest me to resolve the warnings.
I created a dummy job taking only Date field and converted the input date field from dd/mm/yyyy to yyyymmdd using the below function
DateToString(StringToDate(DSLink3.Date,"%dd/%mm/%yyyy"),"%yyyy%mm%dd")
Iam getting the same warning .Input field Datatype is Char(10) and output is Int(10).
I am trying using different target Datatype but couldn't suppress the warnings.
DateToString(StringToDate(DSLink3.Date,"%dd/%mm/%yyyy"),"%yyyy%mm%dd")
Iam getting the same warning .Input field Datatype is Char(10) and output is Int(10).
I am trying using different target Datatype but couldn't suppress the warnings.
I get this warning after I validate the date
I am using a stage variable to validate the date
sv1:IsValid("DATE", StringToDate(DSLink3.Date,"%dd/%mm/%yyyy") )
In the output column the derivation is
If (sv1= @FALSE) Then "-1" Else DateToString(StringToDate(DSLink3.Date,"%dd/%mm/%yyyy"),"%yyyy%mm%dd")
If invalid then -1 else yyyymmdd format.
When I get an invalid date then I am getting the warning
Conversion error calling conversion routine date_from_string data may have been lost
Can anyone suggest me what is the error and how to supress the warnings
I am using a stage variable to validate the date
sv1:IsValid("DATE", StringToDate(DSLink3.Date,"%dd/%mm/%yyyy") )
In the output column the derivation is
If (sv1= @FALSE) Then "-1" Else DateToString(StringToDate(DSLink3.Date,"%dd/%mm/%yyyy"),"%yyyy%mm%dd")
If invalid then -1 else yyyymmdd format.
When I get an invalid date then I am getting the warning
Conversion error calling conversion routine date_from_string data may have been lost
Can anyone suggest me what is the error and how to supress the warnings
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA