Opposite to concatenation

Teknologik

New member
Local time
Today, 15:37
Joined
Feb 10, 2011
Messages
7
Hello,

I require to break up a GPS reading into Longitude and lattitude but can not work out a way to do it.

i have a GPS reading
52.25844,0.614368333333333,6,1.7,FALSE,FALSE

What i want to do is split it into two fields one for Lattitude and the other longitude in a query.

For Example:

Lattitude:
52.25844

Longitude:
0.614368333333333

But want to ignore the 6,1.7,FALSE,FALSE.

Does anyone know how to do this? Any help is much appreciated.

Thanks,
 
Look up the Mid and Left functions; as these values are fixed length there will be no need for Instr to find delimiters.

Brian
 
Look up the Mid and Left functions; as these values are fixed length there will be no need for Instr to find delimiters.

Brian

Thanks for the reply Brian.

In your opinion would something like this work?

52.25844,0.614368333333333,6,1.7,FALSE,FALSE

Latitude: Left([GPSDetails],8)

Longitude: Mid([GPSDetails],16)

I have never used Mid and Left Functions before.

Thanks again.
 
Have a look at the attached sample. Way point are stored as decimal degrees, but can be input or viewed in any format.
 

Attachments

If you are importing the data from a text or csv file, you could just ignore the fields you don't want.
 
If you are importing the data from a text or csv file, you could just ignore the fields you don't want.

The data comes from handheld device so it isn't imported the gps is taken automatically.
 
To answer the question on the Mid you need a start point, I think its 10

Mid([GPSDetails],10.16)

I should have remembered these are difficult to find in help, I think you have to go into VBA help and dig

Brian
 
I would be tempted to use Split() in this setup as long and lat may vary in size

Coods = Split("52.25844,0.614368333333333,6,1.7,FALSE,FALSE",",")

Latitude = coods(0)
longtitude = coords(1)

Untested
 

Users who are viewing this thread

Back
Top Bottom