Any Data Tag that has a date value can be output and have the date format specified. These include:
[register-date]
[lastvisit-date]
[date-of-birth]
- Custom fields of type
calendar
[lastvisit-date format="F jS Y"]
April 16th 2025
The date format characters that you can use are based on the PHP date function.
You can also use date values inside If Structures, like:
{if lastvisit-date >= '2025-02-15'}...{/if}
And you can even compare dates to the current date using Relative Dates or the now()
value.
{if my-event-date > now()}Coming soon...{/if}
Modifying Dates
Users Anywhere also gives you the ability to add a certain time or date offset to a Data Tag with a date value.
You can do so by adding a modify
attribute, and using any string in there that the PHP date modify function understands:
[lastvisit-date modify="+3 hours"]
[date-of-birth modify="-1 year"]