how do i do a divide by

F

Frank Casey

I need to change the values of a column that is in seconds to minutes by
dividing each cell by 3600
 
D

Dan Artuso

HI,
Use an Update query:

Update yourTable Set theField = theField/3600

Just use the corect table and field names.
 
G

George Nicholson

1) if you are dividing by 3600 it sounds more like you want to convert a
field containing seconds to hours. If you were converting seconds to minutes
you would divide by 60.

2) Create an Update query. (On the menu within Design view:
Query>UpdateQuery). Select the field you want to change and under "Update
To:" type in:
[MyFieldName]/3600
*Include the brackets* - indicating a field name - or Access will put quotes
around the field name. It would then be treated as simple text and your
Update will not give you the intended results. You might be wise to make a
backup of your data before doing this, just to be safe.

HTH,
 
M

Micah Chaney

Create a regular Select Query. Ensure that this column is a Number column.
From the File Menu | Query | Update Query. Drag down the field you want to
update. In the Update To box put [field name] / 3600

However, if you want to change seconds to minutes, I think you should divide
by 60 since there are 60 seconds in a minute. Also if there are less than 60
seconds, do you want a decimal answer? If not, you can create a criteria
that says only for those records where seconds is > 60. That would be like
this: >60
Once finished, click run -- it'll tell you you're going to update so many
records, and then execute.

Does this help?
 
J

John Vinson

On Thu, 3 Feb 2005 11:09:06 -0800, "Frank Casey" <Frank
I need to change the values of a column that is in seconds to minutes by
dividing each cell by 3600

Well, there are 60 seconds in a minute, not 3600 - did you mean hours?
What's the datatype of this field? If it's Long Integer or Date/Time,
you will not get the answer you want: Integer will be truncted to
integer hours (or minutes), and date/time is inappropriate for
durations anyway.

Your reference to "cell" suggests that you're talking about Excel not
Access; are you? If so, Microsoft's Help has landed you in the wrong
newsgroup: try microsoft.public.excel instead.

John W. Vinson[MVP]
 
Top