Calculate dates to get a date - InfoPath Dev
in

InfoPath Dev

Calculate dates to get a date

Last post 05-05-2017 08:28 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-04-2017 05:57 PM

    Calculate dates to get a date

    I need two calculate to date picker data types and populate another text field with the result. Not looking count the days like other post. Example 5/4/2017 + 5/14/2017 = 5/10/2017 Can not seem to locate a solution with exacly how to do. Really looking for someone who has done this. Not looking to be redirected links unless it is the solution
  • 05-05-2017 07:37 AM In reply to

    Re: Calculate dates to get a date

    I think what you'd have to do is calculate the difference between the two dates, then add that difference to the first date. Is code an option for you? If not, if you have to use InfoPath formulas, you could use one of the many samples online for getting the number of days between your two dates, then use the built in addDays function to add those days to the first date.... does that make sense?
    Hilary Stoupa

  • 05-05-2017 07:47 AM In reply to

    Re: Calculate dates to get a date

     Ok this makes more since. Do you have a quick reference to calculate the dates? I look on line and there are so many horrible examples

  • 05-05-2017 08:13 AM In reply to

     I actually worked up a quick sample using this link:

    http://www.bizsupportonline.net/infopath2007/calculate-date-difference-infopath-rules-formulas.htm

     I've attached it - save it locally, then right click and select design and preview it. I'm not sure if it does what you want tho, frankly - you mention adding 5/4 to 5/14 and getting 5/10? Which doesn't make sense to me? But at any rate, maybe take a look and see if it gets you any closer to your desired outcome... 

    Hilary Stoupa

  • 05-05-2017 08:22 AM In reply to

    Re: Calculate dates to get a date

    WOW thank you so much. This is great
  • 05-05-2017 08:28 AM In reply to

    Re: Calculate dates to get a date

    One thing tho - if your final form is going to be browser form, you may want to give this test form a quick test in the browser & make sure IPFS doesn't get all upset over the complex formula in the rules. :)
    Hilary Stoupa

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