Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateDiff in Minutes - Round to nearest minute? 1

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I have data like this:
actdate time1 time2
1/1/01 12:05 PM 2:10 PM

I do a datediff formula in a query, as follows:
Code:
DateDiff("n",[TimeTable]![time1],[TimeTable]![time2])/60

problem is that I get a result in the query like 2.08111111111

I want to round to the nearest minute/ 100th decimal, so that I get 2.08, or if the calculation is 2.0854477467 then 2.09

Can someone please assist? I've been looking all over and can't seem to find what should be an easy thing to do.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Could you use the Round function?
[tt][blue]
Round([/blue]DateDiff("n",[TimeTable]![time1],[TimeTable]![time1])/60[blue], 2)[/tt][/blue]

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
I swear I tried that first and it didn't work and now it does lol. Thanks!

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top