Dividing in access...

K

kT

Hey guys,

I am trying to convert minutes into decimal form in a table
I have created in Access. I have created a field and
placed the numbers one through sixty. I want to divide
each of those numbers by sixty and have it placed in the
"Converted Time Field." When I run the query, it comes up
blank. I have been using: [Minutes]![Minutes]/60. Please
help me.

Thanks,
kT
 
D

Duane Hookom

Minutes are stored as decimals. One minute = 0.000694. I'm not sure what you
are attempting to do with this.
 
A

Allen Browne

Not sure which way you are going here.

If you have a Date/Time field for storing time, and you want to show the
time as a number of minutes, try something like this in the Field row of
your query:
DateDiff("n", #0:00:00#, [MyTimeField])

If you have a Number field that stores the minutes, and you are trying to
display it as hours and minutes, try:
Str([Minutes] \ 60) & Format([Minutes] Mod 60, "\:00")

If you are trying to load a table with the results, you could use an Update
query (Update on Query menu). Howver, I don't think that populating a
Date/Time field in a table with a value for each minute would be a useful
thing to do. Due to the rounding errors inherent in all floating point types
(including Date/Time), you could not use such a table reliably for matching
time values.
 
K

kT

That is exactly what I am trying to do. Convert it to a
decimal. My boss instructed me to build a field in access
that can be the guide for converted minutes to decimals
for payroll purposes. So, I have one field with 60
records of course, 1-60 for each minute. Now I want the
next field to have each of those minutes (1/60, 2/60,
etc...) converted to decimals. Can you guys understand
what I am asking? Please help.

Thanks,
kT
-----Original Message-----
Minutes are stored as decimals. One minute = 0.000694. I'm not sure what you
are attempting to do with this.

--
Duane Hookom
MS Access MVP


Hey guys,

I am trying to convert minutes into decimal form in a table
I have created in Access. I have created a field and
placed the numbers one through sixty. I want to divide
each of those numbers by sixty and have it placed in the
"Converted Time Field." When I run the query, it comes up
blank. I have been using: [Minutes]![Minutes]/60. Please
help me.

Thanks,
kT


.
 
D

Duane Hookom

SELECT Format([Num]/60,"0.000") AS PartOfHour
FROM tblNums
ORDER BY tblNums.Num;


--
Duane Hookom
MS Access MVP
--

kT said:
That is exactly what I am trying to do. Convert it to a
decimal. My boss instructed me to build a field in access
that can be the guide for converted minutes to decimals
for payroll purposes. So, I have one field with 60
records of course, 1-60 for each minute. Now I want the
next field to have each of those minutes (1/60, 2/60,
etc...) converted to decimals. Can you guys understand
what I am asking? Please help.

Thanks,
kT
-----Original Message-----
Minutes are stored as decimals. One minute = 0.000694. I'm not sure what you
are attempting to do with this.

--
Duane Hookom
MS Access MVP


Hey guys,

I am trying to convert minutes into decimal form in a table
I have created in Access. I have created a field and
placed the numbers one through sixty. I want to divide
each of those numbers by sixty and have it placed in the
"Converted Time Field." When I run the query, it comes up
blank. I have been using: [Minutes]![Minutes]/60. Please
help me.

Thanks,
kT


.
 
K

kT

That is the SQL route right? What about just running a
regular query from design? How would I do that? Forgive
me, I am novice at best on access.
-----Original Message-----
SELECT Format([Num]/60,"0.000") AS PartOfHour
FROM tblNums
ORDER BY tblNums.Num;


--
Duane Hookom
MS Access MVP
--

That is exactly what I am trying to do. Convert it to a
decimal. My boss instructed me to build a field in access
that can be the guide for converted minutes to decimals
for payroll purposes. So, I have one field with 60
records of course, 1-60 for each minute. Now I want the
next field to have each of those minutes (1/60, 2/60,
etc...) converted to decimals. Can you guys understand
what I am asking? Please help.

Thanks,
kT
-----Original Message-----
Minutes are stored as decimals. One minute = 0.000694. I'm not sure what you
are attempting to do with this.

--
Duane Hookom
MS Access MVP


Hey guys,

I am trying to convert minutes into decimal form in a table
I have created in Access. I have created a field and
placed the numbers one through sixty. I want to divide
each of those numbers by sixty and have it placed in the
"Converted Time Field." When I run the query, it
comes
up
blank. I have been using: [Minutes]![Minutes]/60. Please
help me.

Thanks,
kT


.


.
 
D

Duane Hookom

I'm not sure what you are asking. SQL is a regular query. I can't paste the
"design view screen" into an reply.

--
Duane Hookom
MS Access MVP
--

kT said:
That is the SQL route right? What about just running a
regular query from design? How would I do that? Forgive
me, I am novice at best on access.
-----Original Message-----
SELECT Format([Num]/60,"0.000") AS PartOfHour
FROM tblNums
ORDER BY tblNums.Num;


--
Duane Hookom
MS Access MVP
--

That is exactly what I am trying to do. Convert it to a
decimal. My boss instructed me to build a field in access
that can be the guide for converted minutes to decimals
for payroll purposes. So, I have one field with 60
records of course, 1-60 for each minute. Now I want the
next field to have each of those minutes (1/60, 2/60,
etc...) converted to decimals. Can you guys understand
what I am asking? Please help.

Thanks,
kT
-----Original Message-----
Minutes are stored as decimals. One minute = 0.000694.
I'm not sure what you
are attempting to do with this.

--
Duane Hookom
MS Access MVP


message
Hey guys,

I am trying to convert minutes into decimal form in a
table
I have created in Access. I have created a field and
placed the numbers one through sixty. I want to divide
each of those numbers by sixty and have it placed in the
"Converted Time Field." When I run the query, it comes
up
blank. I have been using: [Minutes]![Minutes]/60.
Please
help me.

Thanks,
kT


.


.
 

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

Top