date

Converts a timestamp into another date format. Works on strings if they contain well-formatted dates.

Input
  • {{ 'now' | date: ''%Y-%m-%d %H:%M' }}
Output
  • 2021-05-21 11:49

Syntax

SyntaxOutputExample
%aAbbreviated weekdayMon, Tue, Wed ... Sun
%AFull weekday nameMonday, Tuesday, Wednesday ... Sunday
%bAbbreviated monthJan, Feb, Mar ... Dec
%BFull month nameJanuary, February, March ... December
%cPreferred local data and time representation
%dDay of month, zero padded01, 02, 03... 31
%-dDay of month, not zero padded
%eDay of month, not zero padded1, 2, 3... 31
%DFormats the datedd/mm/yy
%FFormats the date in ISO 8691 formatyyyy-mm-dd
%HHour of the day (24 hour)00-23
%IHour of the day (12 hour)1-12
%jDay of the year (Julian)001-366
%kHour of the day (24 hour)1-24
%mMonth of the year01-12
%MMinute of the hour00-59
%pMeridian indicatorAM or PM
%r12 hour time%I:%M:%S %p
%R24 hour time%H:%M
%T12 hour time%H:%M:%S
%UNumber of the week in the year (starting on Sunday)
%WNumber of the week in the year (starting on Monday)
%xFormats the datemm/dd/yy
%yYear without the century00-99
%YYear with the century2018
%ZTimezone name