Formatting dates to be human-readable in Make.com

BW

Blair Wadman

Principal Automation Architect

When you send dates from one system to another via Make, the date from the original system may not be in a human friendly format. Therefore, you may want to change the date format to something that is easier for human’s to read and understand. You can do that using the formatDate() function.

An example

I recently synced dates from Recurly to an email marketing system, and the client wanted a specific date format in the email marketing system so that they could use it in the emails sent to customers.

By default, Recurly will return dates in a date format like so: 2021-05-25T07:49:33Z. Not exactly human friendly if you are using these in emails to customers! The format they wanted was 17th August 2023.

I used the formatDate() function as follows, to format it as 17th August 2023:

   {{formatDate(2.body.data[].current_period_ends_at; "Do MMMM YYYY")}}

This is how it looks in Make:

The formatDate() function takes two parameters:

  1. The date value

  2. The date format you want to use

In this case, the date value is from Recurly and will be returned by 2.body.data[].current_period_ends_at .

The date format I want is:

  • Do: Day of month with ordinal. E.g. 1st, 2nd, 17th

  • MMMM: Month name, E.g. August

  • YYYY: 4 digit year, E.g. 2023

This will ensure that 2021-08-17T07:49:33Z is formatted as 17th August 2023.

More examples

The table below is some of the most common tokens that you might need.

TokenExampleDescription
YY23Last 2 digits for year
YYYY20234 digitals for year
M9Month number
MM09Month number with leading 0
MMMMAugustMonth name
D17Day
Do17thDay with ordinal
DD01Day with leading zero
ddSatDay
ddddSaturdayFull day name

Common date formats

See the Make documentation for the full list of token’s:

https://www.make.com/en/help/functions/tokens-for-date-time-formatting

← All posts

Ready to chat about your systems?

Let's discuss how we can start to automate your marketing processes.

Start the Conversation