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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding up 1

Status
Not open for further replies.

ashtonp2

MIS
Jan 21, 2004
27
GB
I am have wrote a formula in an access query which works out the number of months between two date (approx) I want to round up the result and loose all the decimal places. I can not find the round function in access. Can anyone tell me what I have to do.

Below is a copy of the formula

([Date out of Contract]-Now())/30
 
Why not use the DateDiff function:

Code:
DateDiff("m", [Date out of contract], Date())

This will calculate the number of months accurately for you. No decimals involved.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Thanks for the Star. Check out all of the arguments of this function as you can use it to determine many different date and time differences.

Also, check out a function called DateAdd which works much the same way and adds the same type of values to a date.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top