Help

Modify date formats in Zaps

tutorial
Last updated:

Formatter: Dates & Times

Date formats are a way of representing a particular style of writing a date or time. For instance, March 30, 2019 is represented by MMMM DD, YYYY, while 03/30/2019 is represented by MM/DD/YYYY. You can use Formatter to perform basic formatting on dates and times, such as adding and subtracting time or just changing the format. Before you can add Formatter to a Zap, you’ll first need to set up your trigger.


1. Add a Formatter step

  • Click Add a step.
  • Select Action/Search.
  • Under Choose App, search for and select Formatter by Zapier.

Selecting the Formatter by Zapier app within the Zap Editor


2. Choose Date/Time for your Action Event

  • Select Date / Time from the list of options.
  • Click Save + Continue.

Selecting Date / Time for the Formatter action step


3. Customize Date / Time options

Next, choose your transformation, which is the specific thing that you want to do to the date. There are two kinds of date transformations available: you can add or subtract time (e.g., add two days), or change the format (e.g., from 01/01/2019 to January 1, 2019).

Once you choose a transform, you’ll then need to specify the input value by opening the dropdown under Input (by clicking the +) and choosing a field from a previous step.

We want to change a date from March 02, 2018 to 03/02/2018, so we select Format and then find the To format that matches what we want as well as the From format that matches the current structure of our data.

Some transforms will have additional required or optional fields that you can fill out.

Tip

Dates and times can be represented any way you want by combining the variables in the following table.

Date/Time Custom Value Table

TokenOutput
Year YYYY 2000, 2001, 2002 ... 2012, 2013
YY 00, 01, 02 ... 12, 13
Month MMMM January, February, March ...
MMM Jan, Feb, Mar ...
MM 01, 02, 03 ... 11, 12
M 1, 2, 3 ... 11, 12
Day of Year DDDD 001, 002, 003 ... 364, 365
DDD 1, 2, 3 ... 364, 365
Day of Month DD 01, 02, 03 ... 30, 31
D 1, 2, 3 ... 30, 31
Day of Week dddd Monday, Tuesday, Wednesday ...
ddd Mon, Tue, Wed ...
d 1, 2, 3 ... 6, 7
Hour HH 00, 01, 02 ... 23, 24
H 0, 1, 2 ... 23, 24
hh 01, 02, 03 ... 11, 12
h 1, 2, 3 ... 11, 12
AM / PM A AM, PM
a am, pm
Minute mm 00, 01, 02 ... 58, 59
m 0, 1, 2 ... 58, 59
Second ss 00, 01, 02 ... 58, 59
s 0, 1, 2 ... 58, 59
Sub-second SSS 000, 001, 002 ... 998, 999
SS 00, 01, 02 ... 98, 99
S 0, 1, 2 ... 8, 9
Timezone ZZ -07:00, -06:00 ... +06:00, +07:00
Z -0700, -0600 ... +0600, +0700
Timestamp X 1381685817

Once you are happy with your setup, click Continue.


4. Test your formatting

Click Send Test To Formatter by Zapier.

Example of what it looks like when testing the Formatter action step. Here, we see the transform is Format and the input is the original number.

It should tell you your test was successful, and you'll be able to see the results of your test next to the label output.

Example of output from testing a Formatter action step. Here, you can see the test was successful because the date is in the new format we want.

If it looks good, click Continue.

Once you've set up the Formatter step, you'll continue setting up the rest of your Zap by adding another action. Be sure to use the output from the Formatter step in your next action step.


Was this doc helpful?

Need More Help?

Zapier Support

Contact our world class support team and we’ll be happy to help you get up and running!
Contact Us

Hire an Expert

We have a directory of professionals across the globe who are ready to help.
Find a Zapier Expert