Sign In

Welcome Back,

Signup/Login with your account

You must login to ask a question.

You must login to add post.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

  • 0
Saurabh Mishra
Beginner

Difference between two dates in Hours

I have multiple in and out records of a person in office premise on one single column. I need to know the total hours (in decimal) spend in office. I need to first find out minium of time value of the day and maximum time value of the day and get the difference in Hours (in decimal). Please help

Leave an answer

You must login to add an answer.

1 Answer

  1. Hello Saurabh

    Please create the following formula in the Calculated Measure section of the Dashboard Designer or as a Variable in the Schema Manager.

    Reference Documentation:

    1. Dashboard Calculated Measures: Lumenore Help – Calculated Measures
    2. Schema Manager Variables: Lumenore Help – Variables

    Implementation Details:

    1. Navigate to the SQL section of the formula editor.
    2. Use the formula below to calculate the difference between the maximum and minimum time.
    3. This version ensures the result is a decimal value:

    TIMESTAMPDIFF( MINUTE, MIN(“InOutData”.”InOut Time”), MAX(“InOutData”.”InOut Time”) )/60