Skip to Content

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

UDF for Date format


I want to write an UDF

I want to pass Date as an String in format yyyymmdd.

I want to convert it to mm/dd/yyyy. & pass new date as o/p/

But there is a possibility that i/p Date may come as blank in that case I want to keep output as blank.

Please help

Former Member
Former Member replied


>>String month = Date.substring (4,2);

>>String day = Date.substring (6,2);

Index value is wrong. It should be (4,6) and (6,8).



0 View this answer in context

Helpful Answer

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