Skip to Content
avatar image
Former Member

Current Date and Time

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 10, 2006 at 10:03 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2006 at 10:01 AM

    Hi Nandini,

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

    Regards,

    Divija.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 10, 2006 at 10:01 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2006 at 10:03 AM

    Hi,

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

    Ashish.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2006 at 10:16 AM

    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

    Add comment
    10|10000 characters needed characters exceeded