Skip to Content

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

Convert a date to MMDDYYYY

I'm attempting to write a formula to convert a date field to an 8 digit string, which is later barcoded for a customer requirement. If the month or day is <10 then it needs to be padded with a zero, so the overall result is always 8 digits.

I thought this would be an easy task, but I've already spend about 2.5 hours trying different things without success.

Any suggestions would be appreciated.

Former Member
Former Member replied

Use the ToText function:

ToText({table.date},"MMddyyyy")

The case in the text string is by design so don't worry about the uppercase MM

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