How to change date format in generated document
I am having trouble with the date reporting out as mm/dd/yyyy when I would like it reported as dd-Mmm-yyyy. I have a created date column, and a second column with function =DATEONLY([Created Date]@row), and the column is formatted as dd-Mmm-yyyy, as shown in the screen shot below.
When I go to generate a document with this field though, it's pulling in as mm/dd/yyyy, as in this screen shot:
The PDF field is formatted with dd-Mmm-yyyy.
Any suggestions on how to fix this?
Best Answer
-
The column using the DATEONLY function is storing the original format on the back-end which is the format used when generating the PDF.
You will need a text/number column with a formula that outputs a text string that just looks like the date format you want.
=DAY([Created Date]@row) + "-" + IF(MONTH([Created Date]@row) = 1, "Jan", IF(MONTH([Created Date]@row) = 2, "Feb", IF(MONTH([Created Date]@row) = 3, "Mar", IF(MONTH([Created Date]@row) = 4, "Apr", IF(MONTH([Created Date]@row) = 5, "May", IF(MONTH([Created Date]@row) = 6, "Jun", IF(MONTH([Created Date]@row) = 7, "Jul", IF(MONTH([Created Date]@row) = 8, "Aug", IF(MONTH([Created Date]@row) = 9, "Sep", IF(MONTH([Created Date]@row) = 10, "Oct", IF(MONTH([Created Date]@row) = 11, "Nov", "Dec"))))))))))) + "-" + YEAR([Date Created]@row)
Answers
-
The column using the DATEONLY function is storing the original format on the back-end which is the format used when generating the PDF.
You will need a text/number column with a formula that outputs a text string that just looks like the date format you want.
=DAY([Created Date]@row) + "-" + IF(MONTH([Created Date]@row) = 1, "Jan", IF(MONTH([Created Date]@row) = 2, "Feb", IF(MONTH([Created Date]@row) = 3, "Mar", IF(MONTH([Created Date]@row) = 4, "Apr", IF(MONTH([Created Date]@row) = 5, "May", IF(MONTH([Created Date]@row) = 6, "Jun", IF(MONTH([Created Date]@row) = 7, "Jul", IF(MONTH([Created Date]@row) = 8, "Aug", IF(MONTH([Created Date]@row) = 9, "Sep", IF(MONTH([Created Date]@row) = 10, "Oct", IF(MONTH([Created Date]@row) = 11, "Nov", "Dec"))))))))))) + "-" + YEAR([Date Created]@row)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!