cancel
Showing results for 
Search instead for 
Did you mean: 

Date Trans mapping issue: Illegal pattern character

Former Member
0 Kudos

Hi,

I'm trying to map an incoming date with the format yyyy-MM-ddTHH:mm:ss-00:00 using date trans to format it to the default. Only problem is, T isn't a legal character. Are there any other ways around this? A UDF?

Thanks,

Adam

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Adam,

Can u give us the sample input and output date format as u needed.

Best regards,

raj.

Former Member
0 Kudos

It's there..

input:

yyyy-MM-dd<b>T</b>HH:mm:ss-00:00

(notice the T)

output: default

yyyy/MM/dd

justin_santhanam
Active Contributor
0 Kudos

Adam,

No need for UDF ,using standard way its possible.

Input -


> substring[0...10]------>DateTrans[yyyy-MM-dd <b>to</b> yyyy/MM/dd] -


>Output

Hope it solves.

Best regards,

raj.

Former Member
0 Kudos

you use subtring

input- substring(0,9)-Date Tranformation -target field No need of UDF as your getting this input if it isoutput then you need to go UDF.

Regards

Sreeram.G.Reddy

sridharreddy_kondam
Active Contributor
0 Kudos

Hi Adam,

Suggestion is first use <b>replaceString</b> (Replace the coming field by T to empty) and then use <b>Tri</b>m and then use the <b>DateTrans</b> function and use the yyyy-MM-ddHH:mm:ss-00:00 to the target...

This would be solution i think..

Regards,

sridhar

Former Member
0 Kudos

Yeah I figured it out doing it this way (I'm new to XI and hadn't thought of it )...thanks.

Answers (2)

Answers (2)

Former Member
0 Kudos

Adam,

If you are going to have fixed format then you can take the substring for date.

So Date->substring->datetrans->output

Regards,

---Satish

Former Member
0 Kudos

adam,

you need to write a UDF as per i know . because std one does not accept T in between day and time.

Thanks

Sreeram