Add Months to a date field - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Add Months to a date field

Last post 11-12-2013 09:22 AM by wilkies0106aw. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-12-2013 04:07 AM

    Add Months to a date field

     Hi,

     I would like to add a date reminder field to my InfoPath that is the date in field Date Registered ANV plus 36 months (field Months).

     http://office.microsoft.com/en-gb/windows-sharepoint-services-help/examples-of-common-formulas-HA010105479.aspx#BM2

     I have used the formula listed here, but get an error message to say the operand is not an expression.

     =DATE(YEAR([Date Registered ANV]),MONTH([Date Registered ANV])+[Months],DAY([Date Registered ANV]))

     Is anyone able to point out where I am going wrong please?

    The other formula I tried is addDays(Date Registered ANV, 1095)  for the number of days in 3 years, however it then takes 1 day off the registered date and I need it to be exactly 3 years to the date.

    Thank you

     

  • 11-12-2013 09:22 AM In reply to

    Re: Add Months to a date field

      =DATE(YEAR([Date Registered ANV]),MONTH([Date Registered ANV])+[Months],DAY([Date Registered ANV]))

    yes it is a common formula, but works in SharePoint calculated columns, not directly in an InfoPath form. If you have SharePoint you can use the above.

    You might be able to use something like - http://www.hornerit.com/2010/10/infopath-date-calculations-and-date.html to get the date that you want directly with InfoPath.

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