cancel
Showing results for 
Search instead for 
Did you mean: 

User Defined Function Please..

Former Member
0 Kudos

Hi All,

Could any one please help me writing the user defined function.

The source(Database) date format is 31-JAN-99 and the required XI destination Format is yyyyMMdd.

Could any one please help me to sort out the issue.

Regards,

Smith.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kalyan -

As Satish states, you can achieve this by using the DateTrans date function. If your source is 31-JAN-99 then your source format would be <i>dd-MMM-yy</i> (just type this in as it is not listed among the choices). The function assumes <i>MMM</i> is an abbreviated month (e.g. JAN, FEB, DEC, etc.) and if the target format is just <i>yyyyMMdd</i>, for example, the <i>MM</i> part will get converted to the corresponding month number.

Regards,

Jin

Answers (3)

Answers (3)

prabhu_s2
Active Contributor
0 Kudos

Dear Paul

No UDF is required. You have a node function called 'Date transformation'. Use this and link the source and target field. Double click on the date transformation and set the properties which is self explanatory. This will work.

Thkx

Prabhu

Former Member
0 Kudos

Hi All,

I ve tried using date trans dd-MM-yyyy and the response i got is OK but the source year is 99 and the destination should be 1999 . Instead it is considerins as 0099..please help me out.

Thanks,

Smith.

laxman_molugu
Participant
0 Kudos

HI Paul,

Use this date format dd-MMM-yy as the source and yyyyMMdd as the target. It should work. In your example 31-JAN-99 will trasnform into 19990131.

Regards,

Laxman

Former Member
0 Kudos

Paul

You dont need to have a UDF for this. You can use <i><b>DateTrans</b></i> function in message mapping. The only thing you have to do when declaring the fields declare them as <i><b>date</b></i>. Then you give your source as dd-MM-yyyy and target as yyyymmdd.

Ex:

Source field->DateTrans>Target field

The properties of DateTrans should be like above what I have said.

Hope this helps......

---Satish

Former Member
0 Kudos

Hi Satish,

I think the date format DD-MMM-YY is not available in XI 'date transform' function. Please let me know if I am missing something.

Thanks

Kalyan

Former Member
0 Kudos

Kalyan,

You dont have the format defined. Just keyin the format as you want and check out. If you dont get succeed let me know.

---Satish

Former Member
0 Kudos

Hi Paul,

Pls do check the Date Function. In that you can configure the expected source format and also the target format. If its not there only then you need a UDF.

cheers

JK