Forum Discussion

GiuseppeMacri's avatar
GiuseppeMacri
Qrew Captain
5 years ago

Calculate Hours from when a user logs in to now

Hi Team,

I created a formula which essentially calculates the # of hours between when an office opens to now (whereas each office opens at 8am local):

var number Hr=Hour(ToTimeOfDay(Now())-Hours(8))+Minute(ToTimeOfDay(Now()))/60;
If($Hr<0,0,If($hr>8,8,$hr))​

I'm having difficulty converting this formula so that i can leverage a different Start time timestamp. Any thoughts?

------------------------------
GMacri
------------------------------
No RepliesBe the first to reply