How to add dynamic date format in metafield?
{{ data[2] | add_day_to_date: “%d.%m.%y %H:%M”, data[1] }}
Date and Time strftime Format Options
Format | Description | Example |
---|---|---|
| Shortened month name | "Jan" |
| Full month name | "January" |
| Numbered month of the year (01..12) | "01" |
| Day of the month (01..31) | "15" |
| Day of the year (001..366) | "123" |
| Shortened weekday name | "Mon" |
| Full weekday name | "Monday" |
| The numeric day of the week (0..6) | "1" |
| Numeric week number in the year (0..53) [starting with the first Sunday] | "22" |
| Numeric week number in the year (0..53) [starting with the first Monday] | "22" |
| Two-digit year (00..99) | "99" |
| Four-digit year | "2022" |
| Hour of the day (military time) (00..23) | "18" |
| Hour of the day (12-hour clock) (01..12) | "08" |
| Minute of the hour (0..59) | "15" |
| Second of the minute (0..59) | "30" |
| AM or PM | "PM" |
| Time zone name | "Central Time (US & Canada)" |
Updated on: 15/04/2025
Thank you!