Forum Discussion
Duration between two times
- 6 years ago
Anonymous
First of all, make sure the two columns are timestamp columns
Else use time function and make them time stamp
Start Time = Time(left([Strat],2),right([Strat],2)) // Do same with end
My suggestion would make them datetime with date , You can leave the date part if needed
New columns
Start date time = [Date]+[Start Time]
end Date time = if([Start Time] <[End Time ],[Date]+[EndTime],([Date]+[EndTime])+1)
Now you can use date diff
Diff = datediff([Start date time],[end Date time].day)
Anonymous
First of all, make sure the two columns are timestamp columns
Else use time function and make them time stamp
Start Time = Time(left([Strat],2),right([Strat],2)) // Do same with end
My suggestion would make them datetime with date , You can leave the date part if needed
New columns
Start date time = [Date]+[Start Time]
end Date time = if([Start Time] <[End Time ],[Date]+[EndTime],([Date]+[EndTime])+1)
Now you can use date diff
Diff = datediff([Start date time],[end Date time].day)