Has anybody written a database funtion to get this? I got this code from http://www.movable-type.co.uk/scripts/latlong.html R = earth's radius (mean radius = 6,371km) Δlat = lat2- lat1 Δlong = long2- long1 a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2) c = 2.atan2(√a, √(1-a)) d = R.c I am not a math guy, i am just wondering has any one written any db function for this. thanks Deen