| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Returns the current date from the operating system.
Date() --> dDate
The function returns the operating system's date setting.
The Date() function retrieves the current system date as reported by the system clock. The returned value is of Valtype() == "D".
The display of Date values depends on the SET DATE format.
| See also: | CtoD(), DateTime(), DtoC(), DtoS(), SET CENTURY, SET DATE, SET EPOCH, StoD(), Time() |
| Category: | Date and time |
| Source: | rtl\dateshb.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example extracts various information from the current date
PROCEDURE Main
? CDoW( Date() )
?? ",", LTrim( Str( Day( Date() ) ) )
?? ".", CMonth( Date() )
?? "" , LTrim( Str( Year( Date() ) ) )
// result: Wednesday, 25. January 2006
? Date() + 7 // result: 02/01/06
RETURN
http://www.xHarbour.com