Grooper 21.00.0082 is available as of 12-12-2023! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.00.0042 is available as of 03-22-2024! Check the Downloads Discussion for the release notes and to get the latest version.
Grooper 23.1.0018 is available as of 04-15-2024! Check the  Downloads Discussion  for the release notes and to get the latest version.
Options

Need calculate expression for comparing two times

I have a table with three columns: Start Time, End Time, and Total Hours.
Start/End Time are presented in military time on the document... example: "16:20"
Total Hours is represented in hours as a decimal... example: "2.5"

I need a calculate expression to be placed on the Total Hours field that will figure out the difference of the times and convert that difference from minutes to a decimal format, but my .NET skills are total boo boo. I'm sure this is a simple question for the programmers out there.
Matt Harrison
Product Manager
mharrison@bisok.com

Best Answer

Answers

  • Options
    GrooperGuruGrooperGuru Posts: 481 admin
    edited September 2018
    FYI, this almost worked. But it was throwing an exception. I did some research online and it suggested that each time being considered (in this case Start_Time and End_Time) needs to be wrapped in CDate(). So for me, the final expression ended up as below. Will add to master expression lists.

    DateDiff(DateInterval.Minute, CDate(Start_Time), CDate(End_Time)) / 60.0
    Matt Harrison
    Product Manager
    mharrison@bisok.com
Sign In or Register to comment.