I think the answer is "it depends". What is the result if you increment the month for the date 2009-03-31? It's not "2009-04-31", so I think you'll need to be a little more precise about what you want, and maybe explain what you want it for.

In developing a worksheet have a cell representing NEXT DUE DATE that is always the 20th day of the month. A1= NEXT DUE DATE. When Today()=NEXT DUE DATE, attempting to increment it one month and replace the NEXT DUE DATE with the incremented value. Was using the conditional format =IF(TODAY()=A1;???;A1). I've not been successful in obtaining the correct result. Hope this helps. New to OpenOffice so any advise is appreciated.

Thank you Villeroy & Gurhka. Reviewing your test sheet set off a lightbulb-I could easily see what Villeroy meant by copy down A2. Thank you both for helping me understand.I created my own test sheet & got the same results.

Interpotential wrote:A much easier way is the EDATE function which you can feed a date and a number of months after that to return a new date on the same day of the month, just in a different month

Yes, EDATE is a little bit easier, but not compatible with Excel. It's not part of the commonly used set of functions. Both, Excel and Calc have EDATE in their "analysis tools". DATE(y;m;d) is more flexible since it works as "universal date calculator" with any combination of positive or negative numbers for years, months or days. For instance DATE(YEAR(A1);MONTH(A1);0) returns the last day of the preceeding month and it's fairly easy to combine DATE with WEEKDAY to get the first/last Monday...Sunday of some month.

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x

Villeroy wrote:... it's fairly easy to combine DATE with WEEKDAY to get the first/last Monday...Sunday of some month.

I'm feeling especially lazy today; how does that work again?

It works with mod(weekday;7) and the start of a month.Any first weekday for any month of any year:=DATE(myYear;myMonth;1)+MOD(myWeekDay-WEEKDAY(DATE(myYear;myMonth;1));7)myWeekDay=1 -> SundaymyWeekDay=7 -> Saturday

Last weekday:=DATE(myYear;myMonth+1;0)-MOD(WEEKDAY(DATE(myYear;myMonth+1;0))-myWeekDay;7)

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x