I am using the Web XI in creating reports. I have two objcets, one is login time ang other one is logout time on the same day. So how can you calculate the time diffenrece between these two objects in reporter in HH:mm:ss format ?
I am trying to calculate the calculate the the time difference between login and logout that customer using. Please suggest me to resolve this problem.
Thanks for your help. But with this formula, we will get problem sometimes( If i am npt wrong with the following analysis).
If
Login time : 8:30:45
LogOut Time: 10:15:45
With your formula, we’ll get (10-8) hr: (30-15) Min:(45-45)Sec = 2 hr:15 min:00 sec.
Min Diff=If (([logout sec]>=[login sec] AND [logout min]>=[login min]);[logout min]-[login min];If (([logout sec]<[login sec] AND ([logout min]-1)>=[login min]);([logout min]-1)-[login min];If (([logout sec]<[login sec] AND ([logout min]-1)<[login min] AND ([logout Min]-1)>=0);(60-([login min]-([logout min]-1))); If (([logout sec]<[login sec] AND ([logout min]-1)<[login min] AND ([logout Min]-1)<0);((([logout min]+59)-[login min]));toNumber("Something Wrong")))))
Hr Diff=If (([logout sec]>=[login sec] AND [logout min]>=[login min] AND [logout hr]>=[login hr]);[logout hr]-[login hr];If (([logout sec]<[login sec] AND ([logout min]-1)>=[login min] AND [logout hr]>=[login hr]);([logout hr])-[login hr];If (([logout sec]<[login sec] AND ([logout min]-1)<[login min] AND ([logout hr]-1)>=[login hr]);([logout hr]-1)-[login hr];toNumber("Something Wrong"))))
You will have to note that, the above formula will work if the login and log out is done on the same day and time format follows military time (01hrs to 24 hrs)
If the time format is in AM/PM format. Here is the solution. The above code is for military time format. But for both the solution the log-in and log-out should be on the same day.