dateFormat
Syntax
dateFormat LAYOUT INPUT
dateFormat
converts a timestamp string INPUT
into the format specified by the LAYOUT
string.
{{ dateFormat "Monday, Jan 2, 2006" "2015-01-21" }} → "Wednesday, Jan 21, 2015"
See Go’s Layout String to learn about how the LAYOUT
string has to be formatted. There are also some useful examples.
See the time
function to convert a timestamp string to a Go time.Time
type value.