Ever wish you had more control over the date/time in your email templates?

You can with the {dt} function in your email templates.  The function allows you to:

  • Modify the date/time results in your templates
  • Control the formatting of the output

Here is an example of the {dt} function in use:

{dt date="%inspectiondate%" modify="+6 Day" format="m/d/Y"}

You'll notice a few parameters:

date = the date (in this case inspection date (notice how I did have to wrap that in quotes))
modify = this is a statement of what to do w/ that date, in this case +6 days in the future
format = this is the format to display the date in

A few ideas:

"hey, I want to show the date in three days for radon pickup"

{dt date="%inspectiondate%" modify="+3 Day" format="m/d/Y"}

"hey, can I put two days before the inspection?"

{dt date="%inspectiondate%" modify="-2 Day" format="m/d/Y"}

"hey, I want to send an email and show the customer that they should attend 2 hours AFTER I start my inspection?"

{dt date="%inspectiontime%" modify="+2 Hour" format="g:iA"}

"hey, I want a space between my time and the AM / PM?"

{dt date="%inspectiontime%" modify="0 Hour" format="g:i A"}

Did this answer your question?