Can I obtain the date and time stamp at different points in Smarty?

Yes, you can. Please see the examples below for the exact format.

7 days ago

{"-7 day"|strtotime|date_format:"%Y/%m/%d"}

1 year ago

{"-1 year"|strtotime|date_format:"%Y/%m/%d"}

30 days later

{"30 day"|strtotime|date_format:"%Y/%m/%d"}



Datetime is displayed using the PHP strtotime function. Please refer to the link for more details.

If you have any other questions, please use our contact form or Slack workspace.