Click or drag to resize

DMY Function (DateTime)

X#
Returns a character expression in day-month-year format (for example, 31 May 1998) from a Date or DateTime expression. The month name isn't abbreviated.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION DMY(
	tExpression AS DateTime
) AS STRING
Request Example View Source

Parameters

tExpression
Type: DateTime
Specifies the DateTime expression from which DMY( ) returns a character string in day-month-year format.

Return Value

Type: String
Character
Remarks
If Set CENTURY is OFF, DMY( ) returns a character string in a dd-Month-yy format (for example, 16 February 98). If Set CENTURY is ON, the format is dd-Month-yyyy (for example, 16 February 1998).
Examples
X#
1Clear
2Set CENTURY OFF
3? DMY(DATE( ))
4Set CENTURY ON
5? DMY(DATE( ))
See Also