How to change a date format or count days between dates in a workflow
In the workflow, click + and add Date/Time Formatter. Choose Format Date, Format Date-Time or Compare Dates, pick the source field, the input format and the output format. The result is stored in a variable you can use in messages, fields or conditions.
Updated on
Before you start
- Know where the date comes from: a contact field, the appointment date, today's date, a custom value or data received through an inbound webhook.
- If the date comes from a custom value or a webhook, find out which format it arrives in (e.g.
2026-10-14or10/14/2026), because you'll have to specify it. - Contact custom fields store the date only (no time).
Where to find it
Automation › Workflows › (open the workflow) › + › Date/Time Formatter
Step by step
Change the format of a date
- Open the workflow and click the + where you want to process the date.
- Choose Date/Time Formatter.
- In Type, choose Format Date (date only) or Format Date-Time (date with time, for example the appointment start).
- In Field, pick the source: a specific date, the current date, a contact date field, appointment start or end, a custom value or inbound webhook data.
- In From Format, confirm the detected format. For custom values and webhooks, pick manually the format the date arrives in.
- In To Format, choose how you want the date to look (e.g. month/day/year, or long form).
- Click Save Action.
- In the following actions (SMS, email, update field), insert the formatter's variable from the dynamic fields list.
Count the days between two dates
- Add Date/Time Formatter and, in Type, choose Compare Dates.
- In Start Date, pick the first date (e.g. current date) and confirm its format.
- In End Date, pick the second date (e.g. due date, from a contact field) and confirm its format.
- Click Save Action. The result is the number of days of end minus start (negative if the end date has already passed).
- Use the result in an If/Else (e.g. "days is less than 3" → send reminder) or in a message.
Tips
- The formatter doesn't change the original field: it creates a new variable with the result. To store it on the contact, add the Update Contact Field action.
- To add or subtract days from a date, use the Math Operation action; the formatter is for changing how a date looks and for comparing.
- A frequent mistake is the wrong source format: if the date arrives as
10/14/2026and you pick year-month-day, the result comes out empty or wrong.
Common problems
- The variable is empty → The source format doesn't match the actual date. Open the action and fix From Format.
- The day difference is negative → The start date is after the end date. Swap them or use the negative value in your condition.
- I can't pick a custom field with a time → Contact custom fields store the date only. Use Format Date or a source that includes time (appointment, webhook).
- The long-form date comes out in another language → Pick a numeric output format or check your account language.
Was this helpful?
Thanks for your feedback.
