Build Your Course The Easy Way
Get Started Free

Date Filters

In this article:


date

Converts a timestamp into another date format.

{{ current_site.products.first.created_at | date: "%a, %b %d, %y" }} The date parameters are listed below:

%a

Abbreviated weekday.

{{ current_site.products.first.created_at | date: "%a" }}

%A

Full weekday name.

{{ current_site.products.first.created_at | date: "%A" }}

%b

Abbreviated month name.

{{ current_site.products.first.created_at | date: "%b" }}

%B

Full month name.

{{ current_site.products.first.created_at | date: "%B" }}

%c

Preferred local date and time representation

{ current_site.products.first.created_at | date: "%c" }}

%d

Day of the month, zero-padded (01, 02, 03, etc.).

{{ current_site.products.first.created_at | date: "%d" }}

%-d

Day of the month, not zero-padded (1,2,3, etc.).

{{ current_site.products.first.created_at | date: "%-d" }}

%D

Formats the date (dd/mm/yy).

{{ current_site.products.first.created_at | date: "%D" }}

%e

Day of the month, blank-padded ( 1, 2, 3, etc.).

{{ current_site.products.first.created_at | date: "%e" }}

%F

Returns the date in ISO 8601 format (yyyy-mm-dd).

{{ current_site.products.first.created_at | date: "%F" }}

%H

Hour of the day, 24-hour clock (00 - 23).

{{ current_site.products.first.created_at | date: "%H" }}

%I

Hour of the day, 12-hour clock (1 - 12).

{{ current_site.products.first.created_at | date: "%I" }}

%j

Day of the year (001 - 366).

{{ current_site.products.first.created_at | date: "%j" }}

%k

Hour of the day, 24-hour clock (1 - 24).

{{ current_site.products.first.created_at | date: "%k" }}

%m

Month of the year (01 - 12).

{{ current_site.products.first.created_at | date: "%m" }}

%M

Minute of the hour (00 - 59).

{{ current_site.products.first.created_at | date: "%M" }}

%p

Meridian indicator (AM/PM).

{{ current_site.products.first.created_at | date: "%p" }}

%r

12-hour time (%I:%M:%S %p)

{{ current_site.products.first.created_at | date: "%r" }}

%R

24-hour time (%H:%M)

{{ current_site.products.first.created_at | date: "%R" }}

%T

24-hour time (%H:%M:%S)

{{ current_site.products.first.created_at | date: "%T" }}

%U

The number of the week in the current year, starting with the first Sunday as the first day of the first week.

{{ current_site.products.first.created_at | date: "%U" }}

%W

The number of the week in the current year, starting with the first Monday as the first day of the first week.

{{ current_site.products.first.created_at | date: "%W" }}

%w

Day of the week (0 - 6, with Sunday being 0).

{{ current_site.products.first.created_at | date: "%w" }}

%x

Preferred representation for the date alone, no time. (mm/dd/yy).

{{ current_site.products.first.created_at | date: "%x" }}

%X

Preferred representation for the time. (hh:mm:ss).

{{ current_site.products.first.created_at | date: "%X" }}

%y

Year without a century (00-99).

{{ current_site.products.first.created_at | date: "%y" }}

%Y

Year with a century.

{{ current_site.products.first.created_at | date: "%Y" }}

%Z

Time zone name.

{{ current_site.products.first.created_at | date: "%Z" }}

Contact support or access our 24/7 Live Chat:

Contact Support Live Chat

Need Help? Live Chat with Us.