I have a series of coordinates in degree/decimal minute format (30,19.32141120N, 86,8.21221140W) that I am trying to convert into Decimal format. I have put together the following to convert the latitude

Left ( Latitude ; 2 )+(Middle ( Latitude ; 4 ; 8 ))/60

and it appears to work without a problem.

My problem arises with the longitude. In the example above, there are only two digits (86) to left of the comma; however, if you go far enough west, that becomes three digits. So my formula:

Left ( Longitude; 2 )+(Middle ( Longitude ; 4 ;8 ))/60

only works on the two-digit format.

I don't know enough about programming to do an if, this, then, that-type thing. My inelegant solution is to simply perform the calculation again, starting with the fifth character.

Is it possible to do what I want? Could someone point me in the right direction?

Again, many thanks. I always appreciate the help given.

Evening.

Have you explored the Position function?

With this, you can get the position of the comma and take the digits before that place.

if: 86, . . .

using this in your calc above, you could do

Left (Longitude ; Position ( Longitude ; "," ; 1 ; 1) - 1) . . .

EDIT: I forgot 2 parameters in the position function.

I'm doing the -1 because the function returns the position of the text. So it would return 3. You want the first two digits.

For a 3 digit number the comma would be in the 4th place, so it would do Left ( Longitude ; 3)

I'm curious about the calculation. I googled lat/long convert to decimal and saw one just a bit different: Convert Latitude/Longitude to Decimal

If you have FIleMaker Pro Advanced, check out this custom function you can add to your solution. Have you used custom functions before? Here's a good basic info about those: Using custom functions (FileMaker Pro Advanced)