Calculate Start and End Date/Time Duration - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Calculate Start and End Date/Time Duration

Last post 04-26-2012 11:53 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-26-2012 11:00 AM

    Calculate Start and End Date/Time Duration

    Hello All,

       I am using InfoPath 2007 to build a web-enabled form that will be published to a SharePoint 2007 Doc Library. I am having some issues with date/time fields. Here is my scenario...

     I have a seperate field for each of the following: startDate, startTime, endDate, endTime. I have the date fields formatted as 2001-03-14 and the time fields as 09:46.

    I need to find the difference between the date/time an issue started and the date/time the issue was resolved. It could be as little as a few hours or as long as a few days. I tried using this example http://www.bizsupportonline.net/infopath2003/date-time-difference-calculations-vbscript.htm but can not figure out where to find OnAfterChange from the Events dropdown list box on the Data Validation dialog box in InfoPath 2007 (Design). 

     Any suggestions???  Thank you

  • 04-26-2012 11:53 AM In reply to

    Re: Calculate Start and End Date/Time Duration

    I believe the OnAfterChange event should be available if you right-click the field in the data source task pane, but rather than going through the headaches of trying to make sense of some code, I would suggest using the pre-built functionality already available in qRules.  The latest version even has functionality to account for weekends and in v4.2 will also account for holidays.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.