Time Calculations

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I need a little help with a query that I'm making involving time calculations.
In my query I have two columns: [Startime] and [Endtime].
I have already added a column in my query that calculates the difference
[TotalTime].

I need a column [First 30 min] that gives me a "1" when the TotalTime is
greather than 00:01. (That I have found to with : First 30 min:
IIf([TotalTime]>0;"1";"0"))

Now I need a column [Next 15 Min] that gives me the time that is left over
when I substract 29:59 minutes from [TotalTime]. The result rendered in that
column must be shown as a number of the total of quarters left over.

Does anyone have a simple idea?

Thanks in advance

Chris
 
TotalTime: DateDiff("s", [Starttime], [Endtime])

First30Min: IIf([TotalTime] > 1, 1, 0)

QtrHrs: IIf([TotalTime] > 1800, ([TotalTime] - 1799) / 900, 0)

Not sure how you want to round that last one, but this should give you the
options:
http://allenbrowne.com/round.html#RoundUp
 
Thanks already for your help.
I need to round down.
How do I implement this in my field?

Grtz
 
Hi Allen,

I made a new column for the rounddown. That works fine.
Is it also possible to set this Rounddown in the same column as QtHrs?
I am not use to use to working with two functions in one field.
 
Yes: you can wrap one function or expression inside another.
 

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

Similar Threads

Time Calculated minus breaks & lunch 2
Sum and DateDiff 2
Min Query 2
Calculating Time Help 2
Calculating Total Time in a Report 18
Calculate date and show exact minutes 2
Sum Time 3
Multiple Query question 4

Back
Top