cancel
Showing results for 
Search instead for 
Did you mean: 

Current Date and Time

Former Member
0 Kudos

Hi ,

I need to send the current date and current time to the target during mapping.We have a option for current date.

How can I send the current time ?

Thanks & Regrads,

Nandini

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nandini,

if u double click the currentDate function, u will get an option called Target Format. click on the icon that is extreme to that edit box. it takes u to a create pattern dialog. there u have date and time format. u can mention the type of format u want for both the date and time.

Anil

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Nandini,

Create a simple user defined function. This function has no input parameter.

Append the given piece of code to this funtion:

Calendar cal = new GregorianCalendar();

int intHour24 = cal.get(Calendar.HOUR_OF_DAY); // 0..23

int intMin = cal.get(Calendar.MINUTE); // 0..59

int intSec = cal.get(Calendar.SECOND); // 0..59

String strTime = intHour24":"intMin":"intSec;

return strTime;

U will get the current time.

Regards

Neetu

Former Member
0 Kudos

Hi ,

Thank you all.....problem was resolved.

Nandini

Former Member
0 Kudos

Hi,

You can use the in built function "currentDate", where you can set the Date as well as Time format.

Ashish.

udo_martens
Active Contributor
0 Kudos

Hi Nandini,

if u use message mapping there is a standard function CurrentDate. For the time use a own function (Java). If u use ABAP mapping use system fields sy-uzeit and sy-datum.

Regards,

Udo

Former Member
0 Kudos

Hi Nandini,

For getting the current time you can write a user defined function which returns the current time.

Regards,

Divija.