Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Hours Elapsed based on todays date

Hi Experts

 

Not sure if the following mesure will give me what i need ( i am not after the average time, but actual time). I am trying work our the number of hours that have elapsed based on todays date and based on the created on date in the sample data below...

Measure = Averagex(
T,

VAR created_ = T(Created on)
VAR Now_ = Now()

Var SecondsPerHour = 60 * 60
Return
DateDiff(Second, Created_,Now_) 

 

Record IDCreated OnElapsed Time Hours
14/7/2021 07:10:56am98.1
230/4/2021 5:55:10pm32.4
35/1/2021 2:42am8.3
  • Anonymous , seem fine, A measure like 

     

    Averagex(Table, datediff([Created On], now(), second)/3600.0 )

     

    or a column

    datediff([Created On], now(), second)/360.0 

     

     

1 Reply

  • Anonymous , seem fine, A measure like 

     

    Averagex(Table, datediff([Created On], now(), second)/3600.0 )

     

    or a column

    datediff([Created On], now(), second)/360.0