We are currently working on the forum. For the short-term, all forum content will be in read-only format. We apologize for the interruption and look forward to collaborating with you shortly. All the best in your research!

Rules to calculate the number of minutes between two timefields

Hi All,

I know we can use a regular expression to compare times (http://www.trialdatasolutions.com/tds/howto/usingregexpfortimefield.jsp) and we can use javascript to calculate the number of minutes between two timefields (http://www.trialdatasolutions.com/tds/howto/timediff.jsp)
But can we use a regular expression to calculare the number of minutes?? Maybe it is so easy... but I can't see how I can manage that! If someone can help me, I will be very grateful!!!



  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    The regular expression shown is a type of item validation, which checks
    that a float value looks like a time.

    The built-in calculations can add items but since the time is a float, so
    you might have weird stuff like 10:90AM.

    JavaScript has the tools needed to deal with this problem. The example
    places the calculated value in a field so you can write a rule to check
    whether it is within some expected range.

    It might be possible to instead post some discrepancy note data to create a
    query directly, if the item value doesn't need to be saved.
This discussion has been closed.