I am looping through a column of TimeStamps in this format:
6/7/2019 9:15:19 AM CDT
I want to find the difference between the first and last time in terms of hours and minutes preferably in a format such as 8.5.
in the below code, sRange is an array of data containing the timestamp.
6/7/2019 9:15:19 AM CDT
I want to find the difference between the first and last time in terms of hours and minutes preferably in a format such as 8.5.
in the below code, sRange is an array of data containing the timestamp.
Code:
fAction = 0
lAction = 0
For x = LBound(sRange) To UBound(sRange)
If sRange(x, 5) > fAction Then fAction = sRange(x, 5)
If sRange(x, 5) < lAction Then lAction = sRange(x, 5)
Next x
difference = lAction - fAction