Reformat and Compare Dates with the Date/Time Formatter
Dates arrive in all sorts of shapes: a spreadsheet may want one layout, an email another, and a webhook may send a third. The Date/Time Formatter action converts them into the form you need and can also tell you how many days separate two dates.
Three modes
- Format Date: change a date, such as 2025-12-09, into another layout.
- Format Date-Time: change both date and time, such as 2025-12-09 15:48.
- Compare Dates: return the number of days between a start and an end date.
Configure a format
- Add the action in Automation > Workflows and pick a mode.
- Under Field Selection, choose the source. Options include a specific date, the current date, a contact date field, an appointment start or end, a custom value, or data from an inbound webhook.
- Check the From Format. For system fields it is detected automatically. For custom values and webhook data, choose the format that matches the incoming text.
- Choose the To Format from the list.
- Save.
Contact custom fields currently support dates but not date-and-time values.
Compare two dates
Choose a Start Date and End Date, each with its own format. The result is end minus start, so you get a negative number if the start is later.
Use the result downstream
The output is stored as a dynamic variable, such as {{datetime_formatter.1.date}} or {{datetime_formatter.1.datetime}}, where the number is the action's position among formatters. Insert it in emails, texts, field updates, or If/Else conditions.
Handy examples
- Show an appointment date as "December 9" in a reminder text.
- Compare today's date with an invoice due date and send a reminder when it is within three days.
- Convert webhook timestamps before writing them into Google Sheets.
Good to know: If the output looks wrong, the From Format is almost always mismatched; reselect it to match the incoming text exactly.
Was this article helpful?
