View Single Post
  #2  
Old April 22nd, 2010, 07:05 PM posted to microsoft.public.access
John Spencer
external usenet poster
 
Posts: 7,815
Default storing and using elapsed time data

What is 12:15:98 supposed to represent?

If Total Time is a DateTime field you can try
DateDiff("s",0,[Total Time]) to generate the number of seconds
or
[Total Time] * 24*60*60 to generate the number of seconds

You can SUM those expressions to get a grand total and then turn the seconds
back into a STRING that looks like nnn:nn:nn

X represents the total seconds SUM([Total Time] * 24*60*60)

X Mod 60 = seconds
X\60 MOD 60 = Minutes
X\(60*60) = Hours


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

brad wrote:
I am trying to import and calculate totals with data from an external source
that shows totals for time logged into a phone system. This show's totals for
each day:

User Date Total Time
user1 1/1/10 12:15:98
user1 1/2/10 4:14:56
user2 1/1/10 10:54:23

I am having trouble getting the table to store this data so I can calculate
totals over date ranges and for each user. I have found pleanty of
suggestions on how to deal with calculating elapsed time, but none for
handling raw data that is already in this format. Any suggestions?