Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

function module to convert date format from yyyymmdd to mmddyyyy format

function module to convert date format from yyyymmdd to mmddyyyy format

Tags:
Former Member
replied

Satish Panakala wrote:

Hi Rajitha,

Do like this

Data: Var1 type sy-datum,
         var2(8) type c.

var1 = sy-datum.

Concatanate var1+4(2) var1+6(2) var1+0(4) into var2.

write var2.

Reward Points if this helps,

Satish

OMG, this solution is SO wrong. Date formatting depends on the country, the calendar and the user's preferences! THIS only works for a few countries in the world! I can't believe, that Satish gots reward points for this bad solution.....

CONVERT_DATE_TO_EXTERNAL works better, which you can see after setting your date formatting preferences in your User Settings!

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question