Page 1 of 1

date_from_ustring

Posted: Wed Jan 20, 2010 4:06 am
by cherry
Hi All,

Could some one help me how to get rid of this warning message.

My input is a reading from a sequential file and loading to a DB2 table.

Input has a field with type of Varchar(8) and Target field type of Date(10).

When I do a StringToData(<FieldName>,"%YYYY-%MM-%DD") iam getting the following warning message.

Transformer_2,0: Conversion error calling conversion routine date_from_ustring data may have been lost.

Thanks in advance

Best regards
Cherry

Posted: Wed Jan 20, 2010 4:11 am
by cherry
Hi

The input field type is Varchar8.


Best Regards
Cherry

Re: date_from_ustring

Posted: Wed Jan 20, 2010 4:16 am
by sohasaid
Try this Function:

UstringToString(StringToData(<FieldName>,"%YYYY-%MM-%DD"))

Posted: Wed Jan 20, 2010 4:17 am
by ArndW
Your picture for the conversion has 10 characters, but your string only holds 8.

p.s. please delete your duplicate post before someone responds to it.

Posted: Wed Jan 20, 2010 4:20 am
by sohasaid
I think the two dashes counts besides yyyy, mm, & dd.

Posted: Wed Jan 20, 2010 4:25 am
by priyadarshikunal
you have created 2 post and replied to one in 5 minutes.

people reply when they can and if they can. Please delete your other post.

You might have two scenarios

1. You are handling nulls incorrectly.
2. The date string doesn't match the format picture, as mentioned by Arnd.

a search would have revealed the required information you are searchin for.