Time Between - Driving (Expression Function)

This function is available in Platform Versions 14.05.948 and above.

Purpose

The Time Between - Driving function (TIME_BETWEEN_DRIVING) calculates the approximate time to drive between two points on Earth.

Parameters

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:

  • Source Latitude
  • Source Longitude
  • Destination Latitude
  • Destination Longitude

-OR-

To pass the source and destination locations using Address Field values then the first two parameters should be:

  • Source Address Field (Stored Value)
  • Destination Address Field (Stored Value)

-OR-

To pass the source and destination locations using Address Field parts then the first eight parameters should be:

  • Source Street
  • Source City
  • Source State
  • Source Zip
  • Destination Street
  • Destination City
  • Destination State
  • Destination Zip

-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.

  • Format (“formatted”, “seconds”)
  • Use Premium Data (“yes” | “no”)
  • Route Type (“fastest” | “shortest” | “pedestrian” | “walking and public transport” | “bicycle”)
  • Avoid Highways (“yes” | “no”)
  • Avoid Toll Roads (“yes” | “no”)

Output

The output of the Distance Between - Driving function is a number or a string representing the time to drive between two points.

Example

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.

expression function - time between driving.txt · Last modified: 2016/09/14 14:19 (external edit)
Copyright WorkXpress, 2020