XForms home

Products

3


XForms Mobile

Mobile forms for field data collection

Mobile App

Form Designer

Dashboard

APIs & Integrations

Use Cases

Pricing

Start free trial →



CX2

Commissioning completions, rebuilt · Coming 2027

Mobile app

Completion

Add-ons

Punchlist & reports

Setup

Hand-off

Compare

Early access

Request early access →



XDocs

AI documents, from proposal to final report

Field app

AI writing

Report builder

Workload & review

How it works

Solutions

Compare

Join the waitlist →

NOT SURE WHERE TO START?

Compare the three products side by side

See which one fits your team, or talk to us and we’ll point you to the right tool.

Compare products →

Talk to us →

Resources

3

LEARN

Blog

Product news, how-tos and field stories

Customer stories

How field teams use XForms

Example use cases

Inspections, audits, sampling and more

GET HELP

Support center

Guides, FAQs and login links

XForms Mobile support

XForms Cx support

XDocs support

Contact us

WHAT’S NEW

Release notes

Every update to XForms Mobile and XForms Cx, newest first

LATEST FROM THE BLOG

Illustration of a tracked route with location pins and completed checklist items

Tracking waste from cradle to grave using smartphones + AI

All posts →

About

Log in

3

LOG IN TO

XForms Mobile

XForms Cx

XDocs

Contact us
XForms
  • Products
    • XForms Mobile
    • CX2
    • XDocs
  • Resources
    • Blog
    • Customer stories
    • Support center
  • About
  • Contact
  • Log in
    • XForms Mobile login
    • XForms Cx login
    • XDocs login
Blog/XForms Mobile/Auto-calculate elapsed time on your mobile forms

Auto-calculate elapsed time on your mobile forms

XForms Mobile

If your field crews need to record on-site time, they can enter start times and end times into their XForms field form, and XForms will automatically calculate elapsed time in seconds, minutes, hours, days, months, or years.

XF

XForms team

Jul 13, 2023

Auto-calculate elapsed time on your mobile forms

ON THIS PAGE

No headings found in this post.

    SHARE

    What its used for

    If your field crews need to record total drive time, on-site time, and such, they can enter start times and end times into their XForms field form, and XForms will automatically calculate elapsed time.  It can display elapsed time in seconds, minutes, hours, days, months, or years.   And if you set this up in a table grid, you can even add up all the elapsed times and SUM them on the table footer.

    How to set this up

    This is done in the Form Template Designer using an expression named timeDiff.   Steps:

    1. Open your form template
    2. Add time fields for start time and end time.  Something like start_time and end_time
    3. Add a calculated field, and in the expression block of the calculated field, enter the timeDiff expression.  Something like timeDiff({start_time}, {end_time}, ‘minutes’)

    timeDiff expression settings

    Definition:

    Calculates the difference between start time value and end time value and returns the number based on requested unit
    timeDiff({start-time-field}, {end-time-field}, ‘unit’)

    • start-time-field: Date or Time field ID that contains start time
    • end-time-field: Date or Time field ID that contains end time
    • unit: one of the followings surrender by single quote
      • seconds
      • minutes
      • hours
      • days
      • months
      • years

    Example:

    timeDiff({start_time}, {end_time}, ‘hours’)

    What it looks like in the Designer tool

    Here’s what this will look like in the form template Designer. Note that the expression in the example below uses “minutes” as the display units, and then the whole thing is divided by 60.  This could also have been done by just using “hours” as the units (without needing to divide by 60).
    XForms form designer showing a timeDiff expression that calculates elapsed time in hours
     

     

    What it looks like on the mobile app

    Auto-calculated elapsed time fields on a form in the XForms mobile app
     

     

    What you can do with this info when aggregated

     If you set up your form template to SUM the elapsed time columns, you can pass this info to the reporting dashboard aggregation blocks, letting you view the total elapsed time over the selected period of time.  With no more than 2 clicks, you can view the total elapsed time within seconds.  In the xample below notice that the period of time selected was 30 days, and within those 30 days, a total of 181 forms were submitted into XForms, with a total drive time calculated at 408.75 hrs, and on-site time of 258 hours.  Add both of these together and the field crew for this organization recorded 666.75 billable hours over a 1 month period of time.
     
    XForms dashboard aggregation blocks totaling drive time and on-site hours across submitted forms
     

     

     

    Since its XForms, it can scale

    The example above is from one of our customers, whose field crews use XForms to record hazardous and non-hazardous waste information at dozens of locations spread out over an entire state.  Since they started using XForms about 18 months ago, their field crews have submitted over 6,000 forms into the platform for a single client of theirs.

    Want to give XForms a try?

    Click/tap the button below.

    Contact Us

    TRY XFORMS

    Wanna give it a try, risk-free?

    Build a form, capture a record offline and see it land in your dashboard.

    Start free trial
    Talk to us

    XF

    WRITTEN BY

    XForms team

     

    Keep reading

    ← Back to all posts

    Tracking waste from cradle to grave using smartphones + AI

    XForms Mobile

    Sep 5, 2025

    Tracking waste from cradle to grave using smartphones + AI

    How do you ensure that the decarbonization end-product you are paying top dollar for originated from actual waste, and not virgin material?

    Read more →

    Photos in table rows

    XForms Mobile

    Mar 2, 2025

    Photos in table rows

    Now you can take a photo within a table grid row, enabling you to take pictures of something specific and relevant to the information in that row of your table.

    Read more →

    Photo metadata improvements

    XForms Mobile

    Jan 6, 2025

    Photo metadata improvements

    Photo metadata is now captured at the photo level instead of at the form level. This enables viewing of the geolocation of each photo taken, which could differ for each photo captured on the same form.

    Read more →

    NEWSLETTER

    Get new posts in your inbox

    Product updates, field-tested how-tos and customer stories from XForms Mobile, Cx and XDocs.

    New blog newsletter signup

    One email when we publish. Unsubscribe anytime. or request a demo →

    XForms logo

    Field data, commissioning completions and AI documents for teams who work on site. XForms LLC — Raleigh, NC & Bellevue, WA.

    

    XFORMS MOBILE

    Overview

    Mobile App

    Form Designer

    Dashboard

    Pricing

    Support

    Help center

    

    CX2

    Overview

    Mobile app

    Completion

    Add-ons

    Punchlist & reports

    Setup

    Compare

    Early access

    Support

    

    XDOCS

    Overview

    Field app

    How it works

    Solutions

    Compare

    Support

    COMPANY

    About

    Blog

    Support center

    Help center

    Contact

    Privacy Policy

    Terms of Service

    © 2026 XForms LLC. All rights reserved.

    Privacy Policy · Terms of Service