Sum Time

M

miyomo

Hi,
I' m trying to build a db using access..
I have 2 fields: StartTime, EndTime and I would
retrieve the TotalTime (EndTime - StartTime) with a query
in the "hh.mm" format.
I can I accomplish this?
How can I manage times past midnight?

TIA
miyomo
 
S

Steve Schapel

Miyomo,

Try this...
TotalTime: Format([StartTime]-1-[EndTime],"Short Time")
 
M

miyomo

Try this...
TotalTime: Format([StartTime]-1-[EndTime],"Short Time")

Great!!! It works fine! Thanks.
I have another question if you don't mind
My tables is:

Activities StartTime EndTime TotalTime
******* ******* ******* *******
Swim 0930 1030
Run 1430 1530 0100

I would like to perform the time calculation
only for certain activities (eg. not Swim)
Is that possible?
I would like to have only SQL. I use *only* access file
without MSAccess (I'm using Delphi)

Thanks anyway!
Miyomo
 
M

miyomo

miyomo said:
Activities StartTime EndTime TotalTime
******* ******* ******* *******
Swim 0930 1030
Run 1430 1530 0100

I would like to perform the time calculation
only for certain activities (eg. not Swim)
Is that possible?
I would like to have only SQL. I use *only* access file
without MSAccess (I'm using Delphi)

Disregard! I solved in this way:
SELECT Voli.Attivita, Voli.Hi, Voli.Hf, IIf(Voli.Attivita like "Swim*"
,'',Format([HI]-1-[HF],"Short Time")) AS Block
FROM Voli;

Thanks for your help!!

miyomo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top