How to remove time format from datetime field in print pdf

Hi,
I do not want to print time format from print pdf…
Example: DATED: 11-11-2020 instead of DATED: 11-11-2020 08:53AM

Hey

I’m not sure if there is a quick way to do it from the PDF Template Editor itself

Though there may be some workarounds to it


One option might be to create a Custom “Date” field in Studio, call it ie: “XXXX_date_formatted”

Then, create a Workflow for the Module that populates this new Date field with whichever Date you want to use. (Set time or from the other field)

Then, add this “xxxx_date_formatted” field to the PDF Template, instead of your Date Field.

It’s a little unclean, but I think it would do the job!


Alternatively, you could try customizing the “templateparser.php” file
(found in \modules\AOS_PDF_Templates\templateParser.php)

This should let you control the output of the PDF Template generation
Though I haven’t touched it myself, so I’m not sure where to start

1 Like