Click or drag to resize

Today Function

Return the system date as a date value.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION Today() AS DATE
View Source

Return Value

Type: Date
Remarks
Today() provides a means of initializing memory variables to the current date, comparing other date values to the current date, and performing date arithmetic relative to the current date. The display format for dates is controlled by SetDateFormat() and the SET DATE command.  The default format is mm/dd/yy.
Tip Tip
Today() is the same as the Date() function in CA-Clipper, but DATE is a reserved word in X#.
Examples
These examples show Today() used in various ways:
X#
? Today()                                        // 09/09/98
? Today() + 30                                // 10/09/98
? Today() - 30                                // 08/10/98
dDate := Today()
? CMonth(dDate)                        // September
See Also