CToD()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

CToD()

Syntax

CToD( <CharacterValue> )

 

Purpose

To convert a date-formatted character value to a date value type.

 

Parameters

<CharacterValue> is a character value 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. <CharacterValue> is normally a specific value which you supply.

 

Returns

A Date value.

 

Usage

This function allows you to convert a character value formatted as a date to a true date type so that you can compare it against a field that is of date type.

 

Example

If you are using the "Sum_In()" function to add up donation amounts for each donor, and you wish to only add up donations which were made after 01/15/2017, then you would use the "CToD()" function to convert the value "01/15/2017" to a true date type which you may compare to each donation date. The actual condition might look like this:

 

.Donation_Date. >= CToD( "01/15/2017" )