Page 1 of 1

Data string does not match format error???

Posted: Thu Apr 28, 2011 3:37 pm
by Cheintze
Hi guys,

New to the forum and only been working with datastage for a couple of months, and unfortunately, our IBM contract time is up. Trying to make a few changes to jobs and have run into the below error message.

Message:
Xfm,1: Data string '20101015' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %dd.

I don't understand why this could be occuring...as 15 is an integer. There are 8 date fields in the job - and each record contains at least a few dates. The job completes successfully, however all records are being rejected so none are loading into DB2 for this table. I've checked DB2 and the dates are defined as dates. Other similar jobs are working fine.

Any help would be appreciated.

Thanks,
Clay

Posted: Thu Apr 28, 2011 5:01 pm
by ray.wurlod
"%yyyy-%mm-%dd" does not match 20101015. You need to get that right first.

Posted: Mon May 02, 2011 11:57 pm
by Tejas Pujari
you will need two '-' in the source date format. it does not have '-'

Posted: Tue May 03, 2011 5:34 am
by ray.wurlod
Or none in the format string. They have to match.

Posted: Tue May 03, 2011 6:27 am
by chulett
In other words, the mask much match the incoming data so it knows how to parse it, not what you think the output should be.

Posted: Tue May 03, 2011 8:30 am
by blewip
Had a problem with this once.

StringToTimestamp('20100101',"%yyyy%mm%dd") Does not work, although I think it should

StringToTimestamp('20100101',"%yyyymmdd") Works