cancel
Showing results for 
Search instead for 
Did you mean: 

User Function -JAVA

Former Member
0 Kudos

HI Group,

I am new to JAVA can any body help me in writting the

JAVA user defined function to concatenate file with DDMMYY HHMMSS (eg:File_DDMMYY_HHMMSS).I assigned the File for one node ,Please suggest how to get DDMMYY(current date) HHMMSS(Current Time) in message mapping.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi swabap,

FilenameNode-----

*********************|-Concat--targetNode

currentDate------

here currentDate is a Node function (built in) available under Date Category in the Message Mapping.

you double click the currentDate functiona and type ddMMyy_HHmmss in the field. you can choose as well as type in the dropdown box. note that ddMM stuff is case sensitive.

now you double click the Concat function and give _ as teh separator. now the output will definitely be as per your desire.

Regards,

Sundararamaprasad.

Message was edited by: Sundararamaprasad

Former Member
0 Kudos

swabap sct,

U have a very simple issue, just as told in the other post.

U have std functions to do this.

BTW,

UDFs (User Defined Functions) hit the performance.

Good luck.

-Naveen.

Former Member
0 Kudos

Hi swabap,

for date and time you can use standard mapping functions like currentDate.

You don't need a UDF for this mapping, you can concatenate fields using function "concat" and assign "FILE" to a constant.

Kind Regards,

Sergio

Former Member
0 Kudos

In the standard function it is showing yyyymmdd and also I need to separate with underscore.

Former Member
0 Kudos

Hi Swabap,

to separate with underscore you can set the parameter separator of the concatenate function.

Also for the date you can choose in which way you want the date to be generated acting on function parameters.

Hope it helps,

Kind Regards,

Sergio

P.S. mark helpful answers

Former Member
0 Kudos

HI Sergio,

Can you please Elaborate how to do this