Hi CC,
As your demo shows, April 31 = May 1.
If this is not acceptable and the "month delta" is a fixed number of days, we run into another issue that is present in you example but not very obvious.
The issue is day light savings time. Do y'all do that in Europe?
It turns out that there are two days in the year that do not have 24 hours. One has 25 and the other has 23.
I got bit by this last fall when I was trying to shcedule an event to occur at the next occuring midnight. I though I could get away with adding 24 hours worth of seconds to the current time, then "round down to midnight" by using the format time, set hour and second to "0" and then convert back.
Well when the calendar clicked past midnight of the day the clocks were getting set back (the 25 hour day) I called the sub-VI at just after midnight. Well, adding 24 hours was not enough to get me to the next day. The result was that I got the midnight of "today" instead of tomorow.
Yes the application hung!
The customer I was working with went off and developed a VI that did this correctly by using an iterative approach that looked for the time day to change.
So....
1) The example you posted is prefered method of doing this.
2) There are not 24 hours in every day.
Now for a mind numbing ancillary observation:
File written at midnight durring daylight savings time are time stamped as midnight only as long as DST is active. If you check the creating time when DST is not active, there modify time shifts by an hour.
This is similar to the "April 31 = May 1" relation your example demonstrates.
Funny thing time...
Ben