Calculating time - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Calculating time

Last post 01-08-2012 07:27 PM by Jo-Anne Alfafara. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-08-2012 12:58 PM

    • Mark B
    • Not Ranked
      Male
    • Joined on 01-08-2012
    • Blyth, Northumberland. UK
    • Posts 9

    Calculating time

    Hi first let me say I am very new to this both infopath and any sort of coding so be nice.

    I am creating a check form which requires the time taken to complete the task shown at the bottom of the form, I have managed to get it to work if the person filling in the form enters the start and end times manually, however to stop people putting any times my boss wants the start and end times entered when a button is clicked, again I have worked out how to do that by using the button to set the start and end time fields with the now() function.

     The problem I have is adding the buttons breaks my expression for calcuating the time, as this is expecting the 'Time' format *09:46, unfortunately the now() function picks up the data as well and there for gives me a NaN error.

    So both work perfectly OK seperatly but not when I try to combine them

     Is the alternative in InfoPath to the now() function that only picks up the time and not the date?????? or does anyone have any other ideas?

  • 01-08-2012 07:27 PM In reply to

    Hi Mark B,

    What data types are you using for the Start Time and End Time? The now() function will work but try using the dateTime data type and select a format for Time only.

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.