Getting NAN when attempting to dind difference of two dates - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Getting NAN when attempting to dind difference of two dates

Last post 04-19-2018 01:10 AM by OrangeJuice. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-18-2018 02:40 AM

    Getting NAN when attempting to dind difference of two dates

     Hi There

    I want to be able to display the duration in days between todays date and a stored date. I am using a secondary datasorce linked to a SharePoint List.

    In the list I've created 3 columns 1. TimeStamp (date type) 2. TodayDate (Single Line of Text) . Lapsed (Single Line of Text)

    In InfoPath I've added a repeating table form the secondary datasource and pulled in the 3 fields. Then changed the controls in InfoPath:

    TimeStamp - Textfield,  (formatted as Date - 14 March 2001)

    Today - calculated field and set default to TodayDate (using fx)  (formatted as Date - 14 March 2001)

     Lapsed - calculated field and set to TodayDate - TimeStamp

    Unfortunately I get NAN as a result in the Lapsed calculated column. (attached screenshot)

    How can I get this to work? Do I need to use substring in some way? 

     

     

     


     


  • 04-18-2018 08:06 AM In reply to

    Re: Getting NAN when attempting to dind difference of two dates

     Unfortunately, InfoPath has no out of the box date diff function. Here's a link to one way to do this:
    http://www.bizsupportonline.net/infopath2007/calculate-date-difference-infopath-rules-formulas.htm

    You can also do this using code or qRules.

    Hilary Stoupa

  • 04-19-2018 01:10 AM In reply to

    Re: Getting NAN when attempting to dind difference of two dates

     Thanks Hilary, I've seen that post and was hoping there was a simpler method, a bit of a risk investing more time as the solution may not work for me as I need to used current day.

    Appreciate your help. 

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