cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in Standard Function DateTrans

0 Kudos

Hi,

I have a requirement to convert the date format from dd-MMM-yyyy to MMddyyyy.

I am using standard Function "DateTrans" for this conversion.I am getting the error Unparseable date: "01-DEC-2011"

I am working on PI7.1EHP1.

Source Dateformat: 01-DEC-2011(dd-MMM-yyyy)

Target Dateformat: 12012011(MMddyyyy)

Can anyone help me on this?

Regards,

Sharanya

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member472138
Active Contributor
0 Kudos

Hello Sharanya,

I just have tried with your required. It perfectly works for me.

Using the standard function:DateTrans -- double click on it, Provide Input Date Format as dd-MMM-yyyy while selecting the empty row from source date format and date separator as - you can get. Then say OK. Also provide your target date format.

Test your map once. Thats it.

Regards

Pothana

Former Member
0 Kudos

Well Saranya... Your date trans format is perfect..

But in PI 12 month is not dec try dic .. It will work..

If you are specific about DEC then you should write an UDF..

Or use stnd fns by splitting the input date you are getting like

split date by using substrings and for months write fixvalues 0-12 and then concate the results and use std date trans fn this can also do for you...

Former Member
0 Kudos

Hi,

In the dateTrans function, Input date format, hardcode the format as dd-MMM-yyyy since this is not available in the drop down.

For target format, mmddyyyy is available in the drop down. Also ensure that whitespaces are removed else that will cause an unparsableException.

Regards

former_member472138
Active Contributor
0 Kudos

Hello Sharanya

Have you seen this.

/people/sarvesh.singh3/blog/2009/02/13/yes-it-is-possible-with-datetrans-function

Regards

Pothana

Former Member
0 Kudos

Check this blog

/people/sarvesh.singh3/blog/2009/02/13/yes-it-is-possible-with-datetrans-function