Make table query field needs to be rounded

  • Thread starter Thread starter BJM
  • Start date Start date
B

BJM

I have a make table query that needs to create a week
number field. The week number needs to count from the
beginning of the school year, so that I have set the field
as follows...

WeekNo:((Now()-38236)/7)

This returns the number of weeks since September 6th,
2004, of course, but the field reports some rediculous
number of decimal places. How can I round it off to a
whole number?

I have tried using the round function in the query field
syntax as such...

WeekNo:(ROUND((Now()-38236)/7,0))

....but that fails to even create the table. It seems to
make the whole database hang.

Thanks,
BJM
 
You might want to take a look at the DateDiff function. That can calculate the
number of weeks between any two dates. Be careful, it actually counts the
number of times a week has changed. So going from Saturday to Sunday can
trigger one week.

IF that doesn't give you what you want, then try the "More Complete DateDiff
Function" Graham Seach and Doug Steele wrote.
http://members.rogers.com/douglas.j.steele/Diff2Dates.html
 
Back
Top