cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping : Date & Timeformat

Former Member
0 Kudos

Dear friends,

In my mapping i have follwing requirement as follows:

In the target system (DB) - They are expecting Date field in the following format : 12-OCT-2010 11.05.18.000000000 AM

In the soure : There is no Date and Time Fields

How to get this format in the target ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have a look into case 1 & 3 in this blog..

Basically you can do the configuration directly in CurrentDate function, no need to use DateTrans function.

/people/sarvesh.singh3/blog/2009/02/13/yes-it-is-possible-with-datetrans-function

Former Member
0 Kudos

Sarvesh,

Thank you so much Sravesh for your valuable input.

You guys are always rocking !!!!!!!!!!!!

Renu.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You have to use currentDate function and then the DateTransform function.

Yo can easily achieve this functionality using UDF.

Using standard functions too you can achieve this, but it is little complicated.

Use CurrentDate--->DateTrans functions.

Current Date will give u the current date in the format of yyyy/MM/dd and it is mapped to DateTrans function.

In the DateTrans function, for the 'Output Date Format' parameter, put the value as dd-MMM-yyyy HH.mm.ss.SSSSSSSSS.

It will give you the desired output.

For getting the AM or PM value, you can further use substring and get the value of 'HH' from above and after comparing it with 12, you can get AM or PM value and concatenate with the above result.

-Supriya.

Former Member
0 Kudos

Hi Renu,

Using the standard functions, you cannot achieve the requirement.

For this, you need to write a UDF.

Thanks,

Former Member
0 Kudos

Hi,

you can use functions that are mentioned here:

http://help.sap.com/saphelp_nwpi711/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm

If there are no date field in the source structure, you can use the function "currentDate"

To have the desired date format, you need to use 'DateTrans'

Best Regards,

Gábor