Hi,
In my Job, while I am converting from string (of length 10) to date and string (of length 10) to timestamp.
I gave the condition as -- If it is not a valid date then '0001-01-01' for date and '0001-01-01 00:00:00.000000' for timestamp. But eventhough the input record has a valid date it is giving the default values only in the output.
and the warning i got in the director is as follows
Trns_Validate,0: Conversion error calling conversion routine date_from_string data may have been lost
Plz help me out in this issue.
Conversion error
Moderators: chulett, rschirm, roy
Ratan
Look the format of the string in the source and check whether you are using the same format to check whether it is valid or not?. How are verifying whether the string is valid date or not?... Give some examples and your conversion logic we might be able to help you
Thanks
Look the format of the string in the source and check whether you are using the same format to check whether it is valid or not?. How are verifying whether the string is valid date or not?... Give some examples and your conversion logic we might be able to help you
Thanks
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
-
- Participant
- Posts: 34
- Joined: Tue Dec 27, 2005 12:13 am
Hi Siva,
Thank you very much, I gave a different format thats why i didnot get initially.
one more query is : the input field is a string '12-23-2005' can we convert it into timestamp directly. I tried with stringtotimestamp function.but i got the message as
Trns_Validate,0: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%mm-%dd-%yyyy" for conversion "timestamp=timestamp_from_string[%yyyy-%mm-%dd %hh:%nn:%ss](string)": APT_Conversion_String_TimeStamp: Invalid Format [%mm-%dd-%yyyy] used for string_from_time type conversion.
Thank you very much, I gave a different format thats why i didnot get initially.
one more query is : the input field is a string '12-23-2005' can we convert it into timestamp directly. I tried with stringtotimestamp function.but i got the message as
Trns_Validate,0: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%mm-%dd-%yyyy" for conversion "timestamp=timestamp_from_string[%yyyy-%mm-%dd %hh:%nn:%ss](string)": APT_Conversion_String_TimeStamp: Invalid Format [%mm-%dd-%yyyy] used for string_from_time type conversion.
Ratan
Your string only has date part and not time part. What you need to do is concat date and time part together and then convert it into timestamp. If you don't have time part then have default values
Thanks
the input field is a string '12-23-2005' can we convert it into timestamp directly
Your string only has date part and not time part. What you need to do is concat date and time part together and then convert it into timestamp. If you don't have time part then have default values
Thanks
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar