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.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!