Articles on: Shopify

Wildcard and Dynamic Date

The wildcard is the symbol you can use to find any matching file or replace the date.

Symbol that can be replaced with * to find any match file name related with.

Example: Sample*.csv - will match the file name with all the latest files first

Symbol that can replace the date to generate the file daily.

Example: /feed/sample_%Y_%m_%d_*.csv to /feed/sample_2017_05_09_.csv


Wildcard can be used in certain parts such as FTP or Download URL file name representation, filter section, and any part that supports wildcard.

Below is the table to show the differences between today's date, yesterday's date, and the previous year to relate the symbol.

To view the accurate format of the date, please open your feed file via notes or notepad so that can see it clearly. If opened via excel, it could change some of the value formatting such as numbers and dates.


Wildcard for Previous Month



If yesterday is previous month, to get the correct month while keeping the same day, you can use the following format: %Y-%{m-}-%d.
For instance, if today's date is 2024-06-01, using the wildcard will return:

Today: 2024-06-01
Previous Month (Same Day): 2024-05-01

Wildcard for Previous Year



To get the last day of the previous year when today's date is the first day of the year (e.g., 2024-01-01), you can use the wildcard format %{Y-}-%{m-}-%{d-} to get the desired date:

Today: 2024-01-01
Previous Year (Last Day): 2023-12-31



Today Date, Month or Year



SymbolExample
%d01..31 (Date with zero)
%-d1..31 (Date without zero)
%m01..12 (Month with zero)
%-m1..12 (Month without zero)
%d01..31 (Date with zero)
%bJan
%^bJAN
%Y1995, 2009, 2017
%y00..99 (Year last 2 digits)
%y00..99 (Year last 2 digits)
%H00..23 (in 24 hours format)


Yesterday Date



SymbolExample
%{d-}01..31 (Date with zero)


Previous Month



SymbolExample
%{m-}01..12 (Month with zero)
%{m-}01..12 (Month with zero)
%{b-}Jan
%{^B-}JANUARY
%{B-}January
%{^b-}JAN


Previous Year



SymbolExample
%{Y-}1995, 2009, 2017
%{y-}00..99 (Year last 2 digits)

Updated on: 06/06/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!