Search HoldMyTwist

Browse all posts

Calculate invoice due dates in Make: 30 days vs one month

Invoice due dates with Make Free - compare 30 days to 1 month - handle bad input - remember original due date for retries Calculate the due date for invoices in Make Free.

Blank invoice beside two paper calendars linked by a gold ribbon and an aqua date marker.

30-days from when you invoice can be different from 1-month. With date functions (opens in a new tab) in Make you can compute it from date when it was originally issued. You can verify it if you'd like.

The dates in this Make Free exercise are made up. We use two built-in Tools modules. We generate text for due date. No invoice. No reminder. No other app.

Before you start

First, you will need an account on Make. You can create a Make Free account (opens in a new tab) or login to your current account. There is no paid trial or external connection necessary. 1000 credits/month are currently provided in Free. Make sure to review the current Make plan limits (opens in a new tab) before creating a larger workflow. Make sure to leave this practice scenario as Inactive with Run once.

1. Choose the rule before the formula

Use this if you've settled on a specific number of calendar days from issue date. You'll need to check and make sure you have that number right, that you have the starting date right, and whether weekends and holidays will be handled somehow. All those rules are your payment terms. Not the formula's.

If your invoicing application is set up to compute the correct due date, leave it. Manually in a calendar or spreadsheet might be sufficient for a few invoices. Use it if you've got a workflow where you want the same date computed for every record you receive.

2. Create a fixed invoice-date input

Go to Scenarios, select Create scenario. Call the single scenario Invoice due date practice. Add a module: Tools > Set variable. Specify Variable name = invoice_date and Variable value = 2027-01-31 then press the Save button for the module.

The sample date is 31 January 2027. Enter a valid YYYY-MM-DD date, no time or time zone offset. The invoice issue date will stay the same for each rerun. If you were to replace the date with today's date, every time you processed an old invoice, the new calculated deadline would be different.

Make Tools input named invoice_date with the fictional value 2027-01-31.

Make Tools input named invoice_date with the fictional value 2027-01-31.
Open full-size image

3. Calculate 30 days after that date

  1. Press + to right of first module. Select Tools > Set variables.
  2. In Variable 1, enter Variable name: due_date. Enter this expression in Variable value:
Text to copy

{{formatDate(addDays(parseDate(1.invoice_date; "YYYY-MM-DD"; "UTC"); 30); "YYYY-MM-DD"; "UTC")}}

  1. Make sure 1. invoice_date is a coloured mapping token. If you have a different number in your source module, you need to swap it using the mapping panel.
  2. Hit the module's Save. Click Save in the bottom scenario bar.

parseDate parses it as a date. addDays adds 30 days. formatDate spits it out as YYYY-MM-DD text. MM is month (uppercase). For other input formats, check parsing-token reference (opens in a new tab) by Make.

Note that the UTC is explicit here, to make sure you're only working in a single consistent timezone (a date only calculation). This isn't about converting any actual local timestamp. If you have any time or offset in your source, make sure to keep its meaning and apply a matching parse format. There is a different task, convert UTC to local time. See UTC to local time guide.

Make Set variables formula parses invoice_date in UTC, adds 30 days and formats a date.

Make Set variables formula parses invoice_date in UTC, adds 30 days and formats a date.
Open full-size image

Watch out

Take the days (according to your agreed payment rule) and calculate from the issue date (that you have stored). Use UTC in both parts of formula in this case that is only a date. 30 days term may span 2 month boundary. This formula doesn't skip the weekends/public holidays.

4. Check days against months and weekends

The reader then returns to Tools 2nd module, clicks on Add variable, and labels the comparison variable one_month_later. For the Make expression please see the separate copyable code box just below this setup description. The expression in the copyable code box is the exact one the reader should copy into the Variable value. Note that the expression will add one month on the calendar to invoice_date. The expression returns text that is date only, in UTC. The reader saves this module and scenario.

Text to copy

{{formatDate(addMonths(parseDate(1.invoice_date; "YYYY-MM-DD"; "UTC"); 1); "YYYY-MM-DD"; "UTC")}}

  1. click 'Run once'. In the result bubble above the second Tools module:
  2. in the Output check due_date: 2027-03-02 one_month_later: 2027-02-28.
31st of January, 2027 + 30 days = 2nd of March 31st of January, 2027 + 1 month = 28th of February

Make output shows 2027-03-02 after 30 days and 2027-02-28 after one month.

Make output shows 2027-03-02 after 30 days and 2027-02-28 after one month.

31st of January, 2027 + 30 days = 2nd of March 31st of January, 2027 + 1 month = 28th of February

Open full-size image

Adding one month does not equivalent adding 30 days. Here it's 2 days difference. Change input of the first module to 2028-01-31. Save and re-run. Results for leap years are: 30 days - 2028-03-01, 1 month - 2028-02-29.

For the leap-year problem: 30 days -> 1 March, one month -> 29 February.

Make leap-year output shows 2028-03-01 after 30 days and 2028-02-29 after one month.

Make leap-year output shows 2028-03-01 after 30 days and 2028-02-29 after one month.

For the leap-year problem: 30 days -> 1 March, one month -> 29 February.

Open full-size image

For a quick test over a weekend, try changing the input to 2026-10-09. Also change the due_date expression to set 30 to 2. Save those and re-run.

It will return 2026-10-11, which is Sunday. (Since Friday is 2 days from that is Sunday.)

The stand alone one_month_later will still add a month.

If you need to do business days or holidays, you need more calendar stuff.

The due_date formula says plus 2 calendar days. And it comes out to Sunday.

Make output shows Sunday 2026-10-11 after adding two days to Friday 2026-10-09.

Make output shows Sunday 2026-10-11 after adding two days to Friday 2026-10-09.

The due_date formula says plus 2 calendar days. And it comes out to Sunday.

Open full-size image

5. Check a rerun and a failed input

  1. Put back the "invoice_date" to "2027-01-31" and "due_date" (expression) to 30 days. Save both modules and the scenario.
  2. Do the run twice and it should be "2027-03-02" both times. input is stable due to fix input.
  3. How can we do the fail check for this practice scenario? - change the input to "not-a-date", save and run. Open the error bubble above the second module.

The outcome is : DataError No output bundle for that operation.

Make DataError says not-a-date is invalid or does not match the date format.

Make DataError says not-a-date is invalid or does not match the date format.
Open full-size image

Just restore valid input, Save & Run again before exiting the scenario. Keep it Inactive. Even if you repeat this calculation, it won't prevent duplicates of Invoices or reminders in the bigger workflow. They will require different check to prevent duplicate.

If the due date is wrong

Compare the first module invoice_date to the original issue date. If the value is ambiguous (e.g. 04/05/2027) determine whether the source is thinking 4th May or 5th April before deciding which parse format to use. In the second module, make sure the value going into the addDays is correct. For the weekend test it's 2. For the main exercise it's 30. Make sure you're catching any blank, invalid or unexpected input before the billing action. The not-a-date check is only for this one failure. Not all ill-formed inputs.

For this date-only exercise, keep UTC in both parse and format for this. You can shift the calendar date for the display if it's a different output zone. Use Make's formatting token reference (opens in a new tab) to change how this displays if you need something else. Make sure the field receiving it is expecting a date or a text value. This formula outputs text.

Test with known invoices before setting real billing. Include month-end, and whatever weekend/holiday rule you have. Use a benign practice record. In the real destination make two tests. 1) see which input is allowed in the field. 2) see how the real destination behaves when the practice record is repeated. Look at the results of the two destination tests before mapping your validated date into that field for real billing. See the Data Store duplicate check guide for repeated ID's. Overlapping runs limits. The date is being calculated in this practice. Not scheduling the payment or ensuring the time the customer pays.

Before you tie in the actual billing app, check your fictional invoice dates first. Start with Make Free (opens in a new tab). Manually run the practice. Keep this scenario inactive. Confirm your actual billing rules separately.

Sources: Make date and time functions, date parsing and formatting token references, and the plan limits linked above. The fictional example's outputs and failure were checked in a native Make Free scenario.

Share this post