action.skip

How to control the date/time field display on the PDF?

← PDF and Email FAQ

Certain business use cases may require to print the contents of custom date/time fields on the invoice PDF.

Assume, for example, you use a custom object to track and bill usage data, keeping the date and time of an event in a custom date/time field. You want to print the transaction table on the invoice, including the date and time.

In this case, JustOn Billing & Invoice Management would only display the time of the event – without its date. This is because values of date/time fields are handled as time values, and the default options for time formats in the template do not include a date pattern.

So how to allow displaying date and time from date/time fields?

To this end, you

  • First add an according format string to the Time Format field of the Template object, and
  • Then apply the new time format option in the relevant invoice template.

To add the new picklist value – for example, yyyy-MM-dd HH:mm – to the field Time Format of the Template object:

  1. Navigate to the fields list of the Template object.
  2. Click the name of the Time Format field.
  3. In the Values section, click New.
  4. Specify the format pattern as required.

    To enable JustOn to display the ISO date format together with the 24-hour time notation, for example, specify yyyy-MM-dd HH:mm.

  5. Click Save.

You can now proceed to apply this time format:

  1. Open the relevant template.
  2. Click Edit.
  3. In the Formatting section, select the corresponding value in the Time Format field.

    To enable JustOn to display the ISO date format together with the 24-hour time notation, select the value yyyy-MM-dd HH:mm created before.

  4. Click Save.

This will have JustOn print the date and time of the recorded events in the transaction table.