convert kilometers to miles

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In MS Access i have a field that i have broken down into 6 constituent parts,
2 of the parts are in kilometers and i want to convert them to Miles and Yard.
Does anyone know of a way of doing this I know how to do this in Excel butt
Access is a bit out of my technical range. any assistants would be greatly
appreciated

the lay out is 003.1256 a strait forward conversion would suit me fine
 
Cyril

I'm having trouble visualizing a "field ... broken down into 6 constituent
parts". If I take that literally, it could mean that your field is storing
6 separate facts. If true, you'll have to work overtime to develop
work-arounds in Access, which works much better on fields that store single
facts.

I'm having trouble understanding how "2 of the parts are in kilometers". My
understanding of kilometers is that they are a decimal number -- where do
the two parts come in?

What would you do to convert kilometers to Miles and Yards in Excel? You
can do that same calculation in Access. You might want to do so via a
query -- create a new query, add the kilometers field, then add a new field
in which you do the calculation.

You could use this approach to figure whole miles and the fractional mile as
yards.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Thanks for the speedy reply.

the kilometers is in the format 003.1256 Kilometers and meters.
I have used "milestart: Int([kilometerstart])" to give kilometers only i now
need to break down the Meters section to then create the conversion section.
do you know of a faster way to do this.
 
Cyril

I'm still having trouble understanding what you are working with and how.
Are you saying that the ".1256" portion of "003.1256" is your "meters"?
Isn't 3.1256 Kilometers just 3,125.6 meters?

If you are going to be converting from metric to mile/yard, you'd first need
to convert metric to a decimal equivalent miles, then calculate the yards
based on the decimal fraction.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Cyril said:
Thanks for the speedy reply.

the kilometers is in the format 003.1256 Kilometers and meters.
I have used "milestart: Int([kilometerstart])" to give kilometers only i
now
need to break down the Meters section to then create the conversion
section.
do you know of a faster way to do this.
Jeff Boyce said:
Cyril

I'm having trouble visualizing a "field ... broken down into 6
constituent
parts". If I take that literally, it could mean that your field is
storing
6 separate facts. If true, you'll have to work overtime to develop
work-arounds in Access, which works much better on fields that store
single
facts.

I'm having trouble understanding how "2 of the parts are in kilometers".
My
understanding of kilometers is that they are a decimal number -- where do
the two parts come in?

What would you do to convert kilometers to Miles and Yards in Excel? You
can do that same calculation in Access. You might want to do so via a
query -- create a new query, add the kilometers field, then add a new
field
in which you do the calculation.

You could use this approach to figure whole miles and the fractional mile
as
yards.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Kilometers * 1093.61 = Yards
1760 yards = one mile

So
Kilometers * 1093.61 \ 1760 = Miles
(Kilometers * 1093.61) Mod 1760 = Yards left over (to nearest yard)

If you need things to be finer than that post back
Int( Kilometers * 1093.61 * 3 *12 / (1760*3*12)) = miles
((Kilometers * 1093.61 * 3 *12) Mod 1760) \ 36 = fractional yards to
nearest inch
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Cyril said:
Thanks for the speedy reply.

the kilometers is in the format 003.1256 Kilometers and meters.
I have used "milestart: Int([kilometerstart])" to give kilometers only i
now
need to break down the Meters section to then create the conversion
section.
do you know of a faster way to do this.
Jeff Boyce said:
Cyril

I'm having trouble visualizing a "field ... broken down into 6
constituent
parts". If I take that literally, it could mean that your field is
storing
6 separate facts. If true, you'll have to work overtime to develop
work-arounds in Access, which works much better on fields that store
single
facts.

I'm having trouble understanding how "2 of the parts are in kilometers".
My
understanding of kilometers is that they are a decimal number -- where do
the two parts come in?

What would you do to convert kilometers to Miles and Yards in Excel? You
can do that same calculation in Access. You might want to do so via a
query -- create a new query, add the kilometers field, then add a new
field
in which you do the calculation.

You could use this approach to figure whole miles and the fractional mile
as
yards.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Thanks for replying.

Sorry i have not made myself clear as to exactly what I am trying to Achieve.

the original string that i am breaking down is
BAE23100 139.1414:139.1416CP01
ELR, Track ID, Start Kilometers, End Kilometers, Class and Code.
I am breaking down the Start and End Kilometers to Convert to Miles/Yard.
like you said 3.1256 Kilometers is just 3,125.6 meters, which i now need to
convert to Miles/yards as easily as possible. as i have nearly 2million
assets to correct, so getting this right will assist greatly.

Thanks for the help

Jeff Boyce said:
Cyril

I'm still having trouble understanding what you are working with and how.
Are you saying that the ".1256" portion of "003.1256" is your "meters"?
Isn't 3.1256 Kilometers just 3,125.6 meters?

If you are going to be converting from metric to mile/yard, you'd first need
to convert metric to a decimal equivalent miles, then calculate the yards
based on the decimal fraction.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Cyril said:
Thanks for the speedy reply.

the kilometers is in the format 003.1256 Kilometers and meters.
I have used "milestart: Int([kilometerstart])" to give kilometers only i
now
need to break down the Meters section to then create the conversion
section.
do you know of a faster way to do this.
Jeff Boyce said:
Cyril

I'm having trouble visualizing a "field ... broken down into 6
constituent
parts". If I take that literally, it could mean that your field is
storing
6 separate facts. If true, you'll have to work overtime to develop
work-arounds in Access, which works much better on fields that store
single
facts.

I'm having trouble understanding how "2 of the parts are in kilometers".
My
understanding of kilometers is that they are a decimal number -- where do
the two parts come in?

What would you do to convert kilometers to Miles and Yards in Excel? You
can do that same calculation in Access. You might want to do so via a
query -- create a new query, add the kilometers field, then add a new
field
in which you do the calculation.

You could use this approach to figure whole miles and the fractional mile
as
yards.

Regards

Jeff Boyce
Microsoft Office/Access MVP

In MS Access i have a field that i have broken down into 6 constituent
parts,
2 of the parts are in kilometers and i want to convert them to Miles
and
Yard.
Does anyone know of a way of doing this I know how to do this in Excel
butt
Access is a bit out of my technical range. any assistants would be
greatly
appreciated

the lay out is 003.1256 a strait forward conversion would suit me fine
 
Thanks for the Assist.
I used
milestart: Int([kilometerstart]*0.621371192) & "." &
Round(([kilometerstart]*0.621371192-Int([kilometerstart]*0.621371192))*1760,0)
which gave me
86.807, how do i now get it to show number formatted to 086.0807

Thank you every one for your Help
John Spencer said:
Kilometers * 1093.61 = Yards
1760 yards = one mile

So
Kilometers * 1093.61 \ 1760 = Miles
(Kilometers * 1093.61) Mod 1760 = Yards left over (to nearest yard)

If you need things to be finer than that post back
Int( Kilometers * 1093.61 * 3 *12 / (1760*3*12)) = miles
((Kilometers * 1093.61 * 3 *12) Mod 1760) \ 36 = fractional yards to
nearest inch
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Cyril said:
Thanks for the speedy reply.

the kilometers is in the format 003.1256 Kilometers and meters.
I have used "milestart: Int([kilometerstart])" to give kilometers only i
now
need to break down the Meters section to then create the conversion
section.
do you know of a faster way to do this.
Jeff Boyce said:
Cyril

I'm having trouble visualizing a "field ... broken down into 6
constituent
parts". If I take that literally, it could mean that your field is
storing
6 separate facts. If true, you'll have to work overtime to develop
work-arounds in Access, which works much better on fields that store
single
facts.

I'm having trouble understanding how "2 of the parts are in kilometers".
My
understanding of kilometers is that they are a decimal number -- where do
the two parts come in?

What would you do to convert kilometers to Miles and Yards in Excel? You
can do that same calculation in Access. You might want to do so via a
query -- create a new query, add the kilometers field, then add a new
field
in which you do the calculation.

You could use this approach to figure whole miles and the fractional mile
as
yards.

Regards

Jeff Boyce
Microsoft Office/Access MVP

In MS Access i have a field that i have broken down into 6 constituent
parts,
2 of the parts are in kilometers and i want to convert them to Miles
and
Yard.
Does anyone know of a way of doing this I know how to do this in Excel
butt
Access is a bit out of my technical range. any assistants would be
greatly
appreciated

the lay out is 003.1256 a strait forward conversion would suit me fine
 
Format(Int([kilometerstart]*0.621371192,"000") & "." &
Round(([kilometerstart]*0.621371192-Int([kilometerstart]*0.621371192))*1760,0)



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Thanks for the Assist.
I used
milestart: Int([kilometerstart]*0.621371192) & "." &
Round(([kilometerstart]*0.621371192-Int([kilometerstart]*0.621371192))*1760,0)
which gave me
86.807, how do i now get it to show number formatted to 086.0807

Thank you every one for your Help
John Spencer said:
Kilometers * 1093.61 = Yards
1760 yards = one mile

So
Kilometers * 1093.61 \ 1760 = Miles
(Kilometers * 1093.61) Mod 1760 = Yards left over (to nearest yard)

If you need things to be finer than that post back
Int( Kilometers * 1093.61 * 3 *12 / (1760*3*12)) = miles
((Kilometers * 1093.61 * 3 *12) Mod 1760) \ 36 = fractional yards to
nearest inch
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Cyril said:
Thanks for the speedy reply.

the kilometers is in the format 003.1256 Kilometers and meters.
I have used "milestart: Int([kilometerstart])" to give kilometers only i
now
need to break down the Meters section to then create the conversion
section.
do you know of a faster way to do this.
:

Cyril

I'm having trouble visualizing a "field ... broken down into 6
constituent
parts". If I take that literally, it could mean that your field is
storing
6 separate facts. If true, you'll have to work overtime to develop
work-arounds in Access, which works much better on fields that store
single
facts.

I'm having trouble understanding how "2 of the parts are in kilometers".
My
understanding of kilometers is that they are a decimal number -- where do
the two parts come in?

What would you do to convert kilometers to Miles and Yards in Excel? You
can do that same calculation in Access. You might want to do so via a
query -- create a new query, add the kilometers field, then add a new
field
in which you do the calculation.

You could use this approach to figure whole miles and the fractional mile
as
yards.

Regards

Jeff Boyce
Microsoft Office/Access MVP

In MS Access i have a field that i have broken down into 6 constituent
parts,
2 of the parts are in kilometers and i want to convert them to Miles
and
Yard.
Does anyone know of a way of doing this I know how to do this in Excel
butt
Access is a bit out of my technical range. any assistants would be
greatly
appreciated

the lay out is 003.1256 a strait forward conversion would suit me fine
 

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

Back
Top