xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Date()

Returns the current date from the operating system.

Syntax

Date() --> dDate

Return

The function returns the operating system's date setting.

Description

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.

Info

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

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe