JavaScript Editor js editor     Web development 



Main Page

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

MDY(dExpression | tExpression)

Parameters

dExpression


Specifies the date expression to return in month-day-year format.
tExpression


Specifies the datetime expression to return in month-day-year format.

Return Value

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.

Example

The following example creates a user-defined function that returns a date with the corresponding weekday.

В Copy Code
SET CENTURY OFF

CLEAR
? Longdate({^1998-02-16})  && Displays Monday, February 16, 98

SET CENTURY ON
? Longdate({^1998-02-16})  && Displays Monday, February 16, 1998

*** LongDate ***

FUNCTION longdate
PARAMETERS gdDate
RETURN CDOW(gdDate) + ', ' + MDY(gdDate)

See Also



JavaScript Editor js editor     Web development