Calculating Time

sr71aa

Registered User.
Local time
Today, 15:36
Joined
Dec 14, 2005
Messages
10
Hi there,

I need some help with calculating login/logout times. I have an ODBC link set up for the raw data in AVAYA. The problem is that the login/logout times are reflected as the number of seconds that have passed since January 1st, 1970. I need to know what that amount in seconds is in a time format.

I have worked out the number of days difference between my rowdate and the start date of 01/01/1970 so I am left with how many seconds have passed since midnight of the selected date.

For example, the selected date is 3/7/07. The Login time is 5410 (seconds passed since 3/7/07 00:00:00). How do I figure out what time that was (hh:mm:ss)?

Any help would be greatly appreciated.

Rick.
 
Try this, copy and paste into a new column in your query:

Time_Logged_Out:Format(DateAdd("s", "[Login Time field name]", "[From Start Date field name]"), "d mmm yyyy hh:mm:ss")

You can remove the d mmm yyyy if you want.
 
format(5410/86400,"hh:mm:ss")
 
format([loginTime]/86400,"hh:mm:ss")
That way its not static!
 
I was simply showing the method. Substituting the field name seemed obvious.
 
Oh i know . your method was perfect. i was just making it really simple.

obvious to some oblivious to others!
 

Users who are viewing this thread

Back
Top Bottom