PostalCodeDistance()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

PostalCodeDistance()

Syntax

PostalCodeDistance( <cZip1>, <cZip2> )

 

Purpose

To determine the distance in miles between two postal (zip) codes.

 

Parameters

<cZip1> is a character value containing the digits of the first postal code (normally a 5 digit zip code).

<cZip2> is a character value containing the digits of the second postal code (normally a 5 digit zip code).

 

Returns

A numeric value with the distance in miles between the two points given by the two postal codes.

 

Usage

This convenient function may be used anywhere DonorQuest supports expressions, such as in Reports, data Exports, or language-oriented selection (query) definitions. For example, you could create a simple report which shows the local donors you plan to visit today, and arranges them on the report by how far they are from your office.

 

Example

The following example usage would produce a report or data export column which shows how far in miles each donor is from the fixed zip code 98109:

 

CALL

RESULT

PostalCodeDistance( "98109", .Zip. )

30.5