Start a conversation

Add a month to a date

Use this template to add a month to a date, e.g. if the next visit has to be within a month after the first visit. Replace {date} with your own variable name.

var date = moment('{date}', 'DD-MM-YYYY');
var newDate = date.add(1, 'months');

Test this template in the calculation helper.

If you want to use different time units, you can change the second line of the code. For example, if you want to add 2 years to your date instead of 1 month, you can use: 

var newDate = date.add(2, 'years');
Choose files or drag and drop files
Was this article helpful?
  1. Tonya

  2. Posted
  3. Updated