How to print the current date and time?

This article is going to teach you how to print the current date and time in your report. You could simply use the below syntax.

  <p>{{ "now" | date: "%Y-%m-%d %H:%M" }}</p>

And the result will be this one.


If you would like to set a specific time zone, then you could follow the example below.

{% assign currentDate = now | date: "%s" | timezone: "+1" | date: "%Y-%m-%d %H:%M" %}

Video demonstration

Was this article helpful? Yes  No
161 from 194 found this helpful