Click or drag to resize

MDY Function (Date)

X#
Returns the specified date or datetime expression in month-day-year format with the name of the month spelled out.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION MDY(
	dExpression AS DATE
) AS STRING
Request Example View Source

Parameters

dExpression
Type: Date
Specifies the date expression to return in month-day-year format.

Return Value

Type: String
Character
Remarks
If Set CENTURY is OFF, the character expression is returned in a month dd, yy format. If Set CENTURY is ON, the format is month dd, yyyy.
Examples
X#
1Set CENTURY OFF
2Clear
3? Longdate({^1998-02-16})  // Displays Monday, February 16, 98
4Set CENTURY ON
5? Longdate({^1998-02-16})  // Displays Monday, February 16, 1998
6*** LongDate ***
7FUNCTION longdate
8PARAMETERS gdDate
9RETURN CDOW(gdDate) + ', ' + MDY(gdDate)
See Also