Articles on: Frequently Asked Questions (FAQ)

How to add dynamic date format in metafield?

Use the add_day_to_date Liquid filter inside a metafield mapping to add a formatted date. Adjust the date format with the strftime codes listed below.


Metafield date format setup



How to Add a Dynamic Date Format to a Metafield


  1. Open the metafield mapping: Go to Step 2: Matching Column and select the metafield you want to fill with a date.
  2. Enter the formula: Enter the following formula, with the date format and the feed columns you need.


{{ data[2] | add_day_to_date: "%d.%m.%y %H:%M", data[1] }}


  1. Save and run: Save the feed and run it to update the metafield.


Change %d.%m.%y %H:%M to any format from the table below. Use straight quotation marks around the format.



Date and Time strftime Format Options


Format

Description

Example

%b

Shortened month name

"Jan"

%B

Full month name

"January"

%m

Numbered month of the year (01..12)

"01"

%d

Day of the month (01..31)

"15"

%j

Day of the year (001..366)

"123"

%a

Shortened weekday name

"Mon"

%A

Full weekday name

"Monday"

%w

The numeric day of the week (0..6)

"1"

%U

Numeric week number in the year (0..53) [starting with the first Sunday]

"22"

%W

Numeric week number in the year (0..53) [starting with the first Monday]

"22"

%y

Two-digit year (00..99)

"99"

%Y

Four-digit year

"2022"

%H

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

"18"

%I

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

"08"

%M

Minute of the hour (0..59)

"15"

%S

Second of the minute (0..59)

"30"

%p

AM or PM

"PM"

%Z

Time zone name

"Central Time (US & Canada)"



Key Rules & Technical Details


  • Formula syntax: The format is the first argument and the source value is the second argument, in the form add_day_to_date: "format", value.
  • Feed column references: data[1] and data[2] refer to the feed columns by their position, starting at 0.



Troubleshooting Steps


  • Issue: The date appears as raw text or the formula is not applied → Solution: Check that the formula uses straight quotation marks and is enclosed in {{ }}.
  • Issue: The date shows the wrong format → Solution: Check the strftime codes in the table above and adjust the format string.



Good Articles to Continue


Updated on: 13/11/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!