Date Calculation: how to increment a date by exactly 1 month

You can manually construct a valid hyphen-separated date string using the concat() function. Specifically

concat(${year}, '-', ${month}, '-', ${day})

However, the trick is that the month and day need to be zero-padded, which regular numbers wont be. So there is some additional work that needs to be done to zero-pad the month when necessary [since we're explicitly setting the day to '01' in this particular case it is already fine].

Have a play with this and adapt it to your needs:

addmonth.xls (5.5 KB)

2 Likes