GetDate()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

GetDate()

Syntax

GetDate( <CharacterValue> )

 

Purpose

To convert a character value to a date value.

 

Parameters

<CharacterValue> is a character value usually of the form (mm/dd/yy), where "mm" is the two-digit number for the Month, "dd" is the two-digit number for the Day, and "yy" is the two-digit number for the year. However, with the GetDate() function, the form of the date in <CharacterValue> could also be a formal date such as "September 13, 1999".

 

Returns

A Date value.

 

Usage

This function allows you to convert the date inside a character field to a true date type so that you can compare it against a field that is of date type. More commonly, you may wish to use GetDate() to translate freshly imported donor data involving date information from a character form to a true date form for storage in DonorQuest date fields.

 

GetDate() is similar to the CToD() function, but it differs in that GetDate() is capable of translating formal date-formatted character values such as "September 13, 1999".

 

Example

The following examples illustrate GetDate():

 

CALL

RESULT

GetDate( "09/13/99" )

09/13/1999

GetDate( "September 13, 1999" )

09/13/1999

GetDate( "FEBRUARY 4, 2017" )

02/04/2017