
Since we want to convert it to a decimal value of 38 (plus the bits for minutes/seconds) we need to multiply by 24 (number of hours. So, going back to our time expression, 24:00:00 would represent 1 whole day.

The output will be stored in a number field. Where 25 is degrees, 35 is minutes, and 22.3 is seconds. For example, the data would be stored as: 25 35 22.3 It is assumed that the degrees, minutes, and seconds are stored as a string (text), with spaces between the numbers and no symbols.
Convert degrees minutes seconds to decimal degrees excel code#
The code is in VBScript but is easily converted to other programming languages. In the instructions below, you will convert one field in a table of latitude or longitude values in degrees, minutes, and seconds to decimal degrees using the Field Calculator. Here's one way: DD = - (Seconds/3600) - (Minutes/60) + Degrees The conversion must be handled differently if the degrees value is negative. The following is the simple equation to convert degrees, minutes, and seconds into decimal degrees: DD = (Seconds/3600) + (Minutes/60) + Degrees Converting degrees-minutes-seconds values to decimal Ddegree values
