Returns a specified date as a character string in MONTH DD, YY format.

Syntax

MDY(<expD>)

<expD>

The date to return as a character string in MONTH DD, YY format.

Description

MDY( ) returns a date in MONTH DD, YY or MONTH DD, YYYY format, where MONTH is the full month name, DD is the day number, and YY is the year number. If SET CENTURY is OFF (the default), MDY( ) returns the year as 2 digits. If SET CENTURY is ON, MDY( ) returns the year as 4 digits. MDY( ) always returns the day portion as 2 digits, with a leading zero for the first nine days of the month.

If you pass an invalid date to MDY( ), it returns "Unknown 00, 00" or "Unknown 00, 0000".