DriveTime returns the driving time (in minutes) from the origin to the destination. Stop entry formats and available route options are the same as for the Miles function.
=DriveTime (origin, destination [, routing type])
DriveTime returns -1 if the origin, destination, or routing type is not valid. Below is an example of the Shortest drive time using cell references. By default, the returned drive time is in minutes.
To display drive times as “days hours:minutes” in Excel
You must first convert minutes to days by dividing by 24*60 in the DriveTime formula and then change the cell format.
- Calculate the drive time: =DriveTime (A2,B2)/(24*60)
- Highlight the cells whose format you want to change.
- Select the “Cells...” command in the Format menu.
- In the Number tab, choose the Custom category.
- Choose the applicable format or manually enter: d <space> hh:mm and click OK.