Format

R

Roger Bell

I have used an expression in a query as follows:
Expr2: (Now()-[COMMENCEMENT DATE OTHER])/7
The result appears as example: 89.88999
I would like the result to be rounded to the whole number eg: 90
Can I use the Format function as part of the expression, and if so, how
would I word this?

Many thanks for any help
 
K

Keith Wilby

Roger Bell said:
I have used an expression in a query as follows:
Expr2: (Now()-[COMMENCEMENT DATE OTHER])/7
The result appears as example: 89.88999
I would like the result to be rounded to the whole number eg: 90
Can I use the Format function as part of the expression, and if so, how
would I word this?

Many thanks for any help

Try using the CInt function.

Keith.
www.keithwilby.co.uk
 
J

John W. Vinson

I have used an expression in a query as follows:
Expr2: (Now()-[COMMENCEMENT DATE OTHER])/7
The result appears as example: 89.88999
I would like the result to be rounded to the whole number eg: 90
Can I use the Format function as part of the expression, and if so, how
would I word this?

Many thanks for any help

If you're trying to calculate the number of weeks since [COMMENCEMENT DATE
OTHER] to the present, try

Expr2: DateDiff("ww", [COMMENCEMENT DATE OTHER], Date())

Note that Now() returns the current date and time accurate to the second, and
that dividing a number by 7 will usually give a noninteger.
 

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

[newbie] Expression for building a percentage 1
Excel Stop Excel from displaying rounded values 4
Birthdate Screw up 3
Access Query problem 1
DSUM? 7
Format Funcyion in Access 2007 2
IIf Statement Error 3
Another Date Query 4

Top