BlogLearnServicesSolutionsAbout Work with XRay

How to Use Date-Time Functions in Make

In this quick no-code tutorial, we'll show you how to use a few useful date/time functions in Make (formerly Integromat). With just a few clicks, you can reformat your dates, add time, or parse a date from a string.

Written by
Matt Jasinski
and

April 5, 2023

If you're using Make (formerly Integromat) for your no-code automation needs, you may find yourself needing to work frequently with dates and times. Sometimes, you’ll need to transform a lengthy timestamp into a brief, readable format, or add a few days to a given date. In other cases, you may need to parse a timestamp from a string so your apps can work with the date. 

In this blog post, we'll walk you through the process of parsing, formatting, and adding dates using a few simple inline functions.

You can also follow along with the video embedded below. 

Formatting Dates in Make

Formatting dates will allow you to automatically rewrite any date into a format of your choice. This can help you to output dates that are easier for people to read, or just to make sure that every date in your automation is formatted the same way every time. 

To format dates in Make, start by selecting any text field in any module within your scenario. In our example pictured below, we’re using a Slack module that sends a direct message. 

Click on the calendar icon to access Date and Time functions, then click on the “formatDate” function to add it to your text field.

Insert the date you wish to format before the semicolon. You can enter a date directly, or use data retrieved by your scenario. 

Then, enter the format you wish to use after the semicolon. For instance, a format of “MM-DD-YY” would return something like “01/28/23”, while “YYYY/MM/DD” would return “2023/01/28”. 

Once you’ve entered the format you’d like to use, run your scenario to view and verify the output.

Adding Time to a Date in Make

Want to send a followup email two hours after someone reaches out, or set a timeline for a one-month project? Adding time with functions like addHours and addDays may be just what you need. 

To add time to a date in Make, select any text field in any module within your scenario. Click on the calendar icon to access Date and Time functions, then click on “addDays” to add a specified number of days, “addHours” to add hours, etc.

Enter your initial date before the semicolon. Enter the number of days you want to add after the semicolon. 

Run the module to view and verify the output. By default, “AddDays” and similar functions return a timestamp, but you can format this date in Make using “formatDate”.

Enter the entire “AddDays” function and its inputs as the initial date. Then, enter the date format you wish to convert it to. 

Run the module again to verify the output.

Parsing Dates in Make

Finally, let’s take a quick look at parsing dates from strings in Make. 

In many cases, the apps in your Make scenarios won’t be able to process a date that’s written as a string. Instead of “01/28/23”, you’ll need to provide a full timestamp. 

To parse dates from strings in Make, select any text field in any module within your scenario. Click on the calendar icon to access Date and Time functions, then click on the “parseDate” function to add it to your text field.

Before the semicolon, insert the string that you want to parse a date from. After the semicolon, enter the format that the date is in (e.g., MM/DD/YY, or YYYY-MM-DD). 

Run the scenario to verify the output.

Easily work with dates and times in Make

With these inline functions, you'll be able to work with dates and times in Make with ease. Whether you're formatting dates, adding time, or parsing dates, these functions will help you automate your workflows and get more done in less time.

If you’d like to learn more about no-code automation with platforms like Make, Zapier, Notion, and Airtable, be sure to check out our blog or our YouTube channel. You can also follow XRay on Twitter, Facebook, or LinkedIn.

Similar Blog Posts

Not sure where to start with automation?

Hop on a 15-minute call with an XRay Automator to discuss your options and learn more about how we can help your team to get more done.

Schedule a 15-Minute Call