cancel
Showing results for 
Search instead for 
Did you mean: 

XI Current Date and Current Time

Former Member
0 Kudos

Hi Guys,

I have to populate 2 target fileds with Current Date and Current Time of XI system when the mesage is processed through XI system.

There is a standard function for Current Date. But I dont see one for Current Time.

is there any way to find the Current Time of XI system. Should I write a user-Defined function, if so, can you help how to go about?

Thanks for your suggestions ASAP.

Regards, Namadev

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

you can achieve it with the currentdate function itself.

in the properties,

dd/MM/yyyy (or any other date format) will return the date

HHmmss returns time

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks guys.

I did write a simple User-defined function.

I imported java.text.*;

and wrote below code.

-


Date now = new Date();

DateFormat df = new SimpleDateFormat ("hh:mm:ss");

return df.format( now );

-


Thanks for your suggestions.

Namadev

udo_martens
Active Contributor
0 Kudos

Hi Namadev,

you can use "currentDate" and put for example a format "dd/MM/yyyy HH/mm/ss".

Regards,

Udo