date_from_ustring

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
cherry
Participant
Posts: 108
Joined: Sun Jul 10, 2005 1:35 am

date_from_ustring

Post 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
cherry
Participant
Posts: 108
Joined: Sun Jul 10, 2005 1:35 am

Post by cherry »

Hi

The input field type is Varchar8.


Best Regards
Cherry
Last edited by cherry on Wed Jan 20, 2010 5:10 am, edited 1 time in total.
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Re: date_from_ustring

Post by sohasaid »

Try this Function:

UstringToString(StringToData(<FieldName>,"%YYYY-%MM-%DD"))
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Last edited by ArndW on Wed Jan 20, 2010 4:22 am, edited 1 time in total.
sohasaid
Premium Member
Premium Member
Posts: 115
Joined: Tue May 20, 2008 3:02 am
Location: Cairo, Egypt

Post by sohasaid »

I think the two dashes counts besides yyyy, mm, & dd.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply