Access Sum Statement when using Time (RESOLVED)
Had a look searching for this but not really what i wanted
have this
SELECT *
FROM Production
WHERE Production.Line = 'D4'
AND Production.Shift = 'B'
AND Production.Date = #07/13/04#;
displays
Run Time
01:45
03:30
03:05
01:20
00:45
however when run
SELECT SUM([run time]) AS ["Run Time"]
FROM Production
WHERE Production.Line = 'D4'
AND Production.Shift = 'B'
AND Production.Date = #07/13/04#;
it displays
"""Run Time"""
0.434027777777778
so i think the formating of the result needs doing but how do i do this in access?? any help please thanks in advance
would be greatful
put this into excel and the numbers added up give the 0.43 but want to add as time, not a number, any help thanks
Re: Access Sum Statement when using Time
Try this amendment:
Code:
SELECT Format(SUM([run time]),"hh:nn") AS ["Run Time"]
...
As dates/times are stored as numerics internally (the Integer part is the date), this should work nicely. :)
Re: Access Sum Statement when using Time
try this
SELECT cdate(SUM([run time])) AS ["Run Time"]
FROM Production
WHERE Production.Line = 'D4'
AND Production.Shift = 'B'
AND Production.Date = #07/13/04#;
Re: Access Sum Statement when using Time
Quote:
Originally Posted by si_the_geek
Try this amendment:
Code:
SELECT Format(SUM([run time]),"hh:nn") AS ["Run Time"]
...
As dates/times are stored as numerics internally (the Integer part is the date), this should work nicely. :)
thats it great thanks very much, knew wasnt far off, cheers