Category Archives: MySQL

Convert Decimal Degrees to Degree-Minute-Second in MySQL

It is common to use PHP (or ASP, JavaScript, etc…) to convert DD to DMS in web projects. However, when the coordinates are stored in a database, it is also possible to do the conversion in the database itself when the data is queried, thus simplifying the code of your webpages.

Here is how to create a function in MySQL to convert Decimal Degrees to Degree-Minute-Second: Continue reading