Adding a Year to a date - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Adding a Year to a date

Last post 02-24-2010 05:04 PM by aberya. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 02-24-2010 05:04 PM

    Adding a Year to a date

    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 

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.