DToC()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

DToC()

Syntax

DToC( <DateValue> )

 

Purpose

To convert a date to a character value of the form "mm/dd/yy".

 

Parameters

<DateValue> may be the name of a date field (such as the .Donation_Date. field), but it may also be any value of Date type -- such as the current date returned by the "Date()" function.

 

Returns

DToC() returns a character value representation of a date value so that it may be combined with other character values using the + operator. The standard American date format of (mm/dd/yy) is not appropriate for sorting since dates of this format would be "alphabetized" starting with month, then day, then year. If you wish to convert a date value to a character value for use in ordering data, use the DtoS() function instead. A null (empty) date returns a character value consisting of eight spaces.

 

Usage

DToC() is a date conversion function that converts a date value to a character value, so that you may combine the date with other character values.

 

Example

In a custom donation receipt report, you wish to have a phrase referencing .Donation_Date. combined with other text. You could do this by entering the following expression:

 

"Your most recent donation was made on " + DToC( .Donation_Date. )