Hi Guys
I am using InfoPath 2007 with MOSS 2007 Form Services.
Does anyone know the correct formula to add a year minus one day to a date in InfoPath? I cannot use code because I want the form to be usable in Form Services and Offline in InfoPath so I am limited to the xpath formulas.
So far I have a formula that adds a year but it doesn't take into account leap years.
concat(string(number(substring-before(.,"-")) + 1),"-", substring-after(.,"-"))
Unfortunately I was using AddDays(365) but there appears to be a problem with sharepoint setting dates to Zulu time (Z) which xpath AddDays doesn't appear to handle.
Thanks
Alan