- Introduction to WorkXpress
- Building Your Application
- Examples and Best Practices
- Technical Manual
This function is available in Platform Versions 14.05.948 and above.
The Time Between - Driving function (TIME_BETWEEN_DRIVING) calculates the approximate time to drive between two points on Earth.
This function has a variable number of parameters depending on the data being used:
To pass the source and destination locations using Latitude and Longitude the first four parameters should be:
-OR-
To pass the source and destination locations using Address Field values then the first two parameters should be:
-OR-
To pass the source and destination locations using Address Field parts then the first eight parameters should be:
-AND-
Regardless of the source and destination input parameters, the following parameters can follow the source and destination inputs. All of these parameters are optional and their default values are in bold.
The output of the Distance Between - Driving function is a number or a string representing the time to drive between two points.
For example, the time to drive between 304 Market St. Harrisburg, PA and 304 Market St. San Francisco CA would be:
TIME_BETWEEN_DRIVING(40.261081,-76.880648,37.792335,-122.397622) will result in 40:26:11.
TIME_BETWEEN_DRIVING(40.261081,-76.880648,37.792335,-122.397622,“seconds”) will result in 145571.