Skip to content

Date ​

Formats a date. The input is a date string, a Unix timestamp, or now. The format uses strftime directives.

liquid
{{ date | date: format }}

Example ​

liquid
{{ '2026-10-05 14:30:00' | date: '%B %e, %Y' }}
{{ '2026-10-05 14:30:00' | date: '%Y-%m-%d %H:%M' }}
{{ '2026-10-05 14:30:00' | date: '%a %d %b' }}

Output

html
October 5, 2026
2026-10-05 14:30
Mon 05 Oct

Directives ​

DirectiveOutput
%aShort weekday name, Mon
%AFull weekday name, Monday
%dDay of the month with a leading zero, 05
%eDay of the month, 5
%uDay of the week, 1 (Monday) to 7 (Sunday)
%wDay of the week, 0 (Sunday) to 6 (Saturday)
%WWeek number of the year, 41
%b, %hShort month name, Oct
%BFull month name, October
%mMonth with a leading zero, 10
%yTwo-digit year, 26
%YFour-digit year, 2026
%D, %xDate as 10/05/26
%FDate as 2026-10-05
%HHour, 24-hour clock, with a leading zero, 14
%kHour, 24-hour clock, 14
%IHour, 12-hour clock, with a leading zero, 02
%lHour, 12-hour clock, 2
%MMinutes, 30
%SSeconds, 00
%pAM or PM
%Pam or pm
%rTime as 02:30:00 PM
%RTime as 14:30
%T, %XTime as 14:30:00
%zTime zone offset, +0000
%ZTime zone abbreviation, UTC
%cDate and time as Mon Oct 5 14:30:00 2026
%sUnix timestamp
%nLine break
%tTab
%%%