How to change date format in generated document

Options

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

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓
    Options

    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

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓
    Options

    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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!