Time problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!!
I have 3 fields in a table
start: 09:00
end: 15:30
time all : 13

So my tme is 13 and a day is from 09:00 to 15:30 (danish time)
that will give me a day on 6 hh and 30 mm
How can i make a query there can tell me how many days there are
in my case here it would give 2 day because on day is 6 hh and 30 mm
and the total time is 13
i have try many things, but i allways get the wrong result.

Hop someone can understand me , and help me

regards

Alvin
 
alvin Kuiper said:
I have 3 fields in a table
start: 09:00
end: 15:30
time all : 13

So my tme is 13 and a day is from 09:00 to 15:30 (danish time)
that will give me a day on 6 hh and 30 mm
How can i make a query there can tell me how many days there are
in my case here it would give 2 day because on day is 6 hh and 30 mm
and the total time is 13
i have try many things, but i allways get the wrong result.

assuming [start] and [end] are type Date/Time,
one way might be:
(replace "yourtable" w/ name of your table)

SELECT
t.[start],
t.[end],
t.[time all],
DateDiff("n",t.[start],t.[end]) As ShiftMins,
t.[time all] * 60 As TimeMins,
([TimeMins]/[ShiftMins])/1440 As UnRoundedDays
FROM
yourtable As t;
 
Back
Top