DISTANCE
Description
Calculates the distance between two locations in kilometers.
Syntax
DISTANCE(lat1, lon1, lat2, lon2) -> Double
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| lat1 | Double | Yes | Latitude of the first point. |
| lon1 | Double | Yes | Longitude of the first location. |
| lat2 | Double | Yes | Latitude of the second point. |
| lon2 | Double | Yes | Longitude of the second location. |
Example
DISTANCE(40.7128, -74.0060, 51.5074, -0.1278)
-- Returns 5570.222179737957.