Skip to main content

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

Yes, you can. Please use the Smarty plugin for the "date" functionality.

7 days ago

{date var='date' time='-7 day' format='Y/m/d'}

1 year ago

{date var='date' time='-1 year' format='Y/m/d'}

30 days later

{date var='date' time='30 day' format='Y/m/d'}

Today

{date var='date' time='today' format='Y/m/d'}

Now

{date var='date' time='now' format='Y/m/d H:i:s'}

Support

If you have any other questions, please contact us or check out Our Slack Community.