Harbour All Functions – D

Date()
Day()
Days()

DaysInMonth()
DaysToMonth()

dbAppend()
dbClearFilter()
dbCloseAll()
dbCloseArea()
dbCommit()
dbCommitAll()
dbCreate()
dbDelete()
dbEval()
dbF()
dbFilter()
dbGoBottom()
dbGoTo()
dbGoTop()
dbReCall()
dbRLock()
dbRLockList()
dbRUnlock()
dbSeek()
dbSelectArea()
dbSetDriver()
dbSetFilter()
dbSkip()
dbSkipper()
dbStruct()
dbUnlock()
dbUnlockAll()
dbUseArea()

DecToBin()
DecToHexa()
DecToOctal()

Deleted()
Descend()
DevOutPict()
DirChange()
DirRemove()
DiskSpace()

DMY()
Do()
DoW()

DOY
DToC()

DToR
DToS()

Harbour Date & Time Functions

Date & Time Functions

ADays Returns an array with the days names
AddMonth Adds or subtracts months to/from a date
AMonths Returns an array with the months names
BOM Beginning date Of Month of given date
BOQ Date of beginning Of quarter containing given date
BOY Date to find first day of year, default is DATE()
CDoW Converts a date to the day of week
CMonth Return the name of the month
CToD Converts a character string to a date expression
CToDoW Convert name of day of the week to its ordinal number
CToMonth Convert name of month to its ordinal number
Date Return the Current OS Date
Day Return the numeric day of the month
Days Convert elapsed seconds into days
DaysInMonth Returns the number of days in month
DaysToMonth Total number of days from first of Jan to beginning of nMonth
DMY Returns the date as a string in DD Month YY format
DoW Value for the day of week
DOY Determines the day of the year for a specific date
DToC Date to character conversion
DToS Date to string conversion
ElapTime Calculates elapted time
EOM End Of Month
EOQ Date of end of quarter
EOY Last date Of Year
IsLeap Tests if a specific year is a leap year
IsLeapYear Checks if the given date is a leap year
LastDayOM Determines the number of days in a month
MDY Returns the date as a string in Month DD, YY or Month DD, YYYY
Month Converts a date expression to a month value
NToCDoW Find day name by num of day
NToCMonth Find a month name by the number of month
Quarter Returns a number equal to the quarter in which a date falls
Seconds Returns the number of elapsed seconds past midnight
Secs Return the number of seconds from the system date
SecToTime Converts seconds into a time string
Time Returns the system time as a string
TimeValid Determines whether a specified time is valid
TimeToSec Calculates the seconds since midnight
WaitPeriod Pauses a specified time in increments of 1/100 seconds
Week Returns the calendar week a number
WOY Gets the week number of the year
Year Converts the year portion of a date into a numeric value

SET EPOCH

SET EPOCH

Specify a base year for interpreting dates

Syntax

      SET EPOCH TO <nEpoch>

Arguments

<nEpoch> Base Century.

Description

This command sets the base year value for dates that have only two digits. The default setting is 1900. Dates between 0100-01-01 and 2999-12-31 are fully supported.

Examples

      SET EPOCH TO 2000

Compliance

Clipper

Seealso

SET DATE, SET CENTURY, CToD(), Date(), DToC(), Set()

SET DATE

SET DATE

Assigns a date format or chooses a predefined date data set.

Syntax

      SET DATE FORMAT [TO] <cFormat>

      SET DATE [TO] [ANSI / BRITISH / FRENCH / GERMAN 
      / ITALIAN / JAPAN / USA / AMERICAN]

Arguments

<cFormat> Keyword for date format

Description

This command sets the date format for function display purposes. If specified, <cFormat> may be a customized date format in which the letters d, m and y may be used to design a date format. The default is an AMERICAN date format; specifying no parameters will set the date format to AMERICAN. Below is a table of the various predefined dates formats.

       Syntax         Date Format
       ------------   -----------  
       ANSI           yy.mm.dd
       BRITISH        dd/mm/yy
       FRENCH         dd/mm/yy
       GERMAN         dd.mm.yy
       ITALIAN        dd-mm-yy
       JAPAN          yy.mm.dd
       USA            mm-dd-yy
       AMERICAN       mm/dd/yy

Examples

      SET DATE JAPAN
      ? Date()
      SET DATE GERMAN
      ? Date()

Compliance

Clipper

Seealso

SET DATE, SET EPOCH, CToD(), Date(), DToC(), Set()

SET CENTURY

SET CENTURY

Toggle the century digits in all dates display

Syntax

      SET CENTURY on | OFF | (<lCent>)

Arguments

<lCent> Logical expression for toggle

Description

This command allows the input and display of dates with the century prefix. It will be in the standart MM/DD/YYYY format unless specified by the SET DATE command or Set() function. If <lCent> is a logical true (.T.), the command will be set on; otherwise, the command will be set off

Examples

      SET CENTURY ON
      ? Date()
      SET CENTURY OFF

Compliance

Clipper

Seealso

SET DATE, SET EPOCH, CToD(), Date(), DToC(), Set()

Time()

Time()

Returns the system time as a string

Syntax

      Time() --> cTime

Arguments

None

Returns

<cTime> Character string representing time

Description

This function returns the system time represented as a character expression in the format of HH:MM:SS

Examples

      ? Time()

Compliance

Clipper

Platforms

All

Files

Library is core

Seealso

Date(), Seconds()

DToS()

DTOS()

Date to string conversion

Syntax

      DTOS(<dDateString>)  --> cDate

Arguments

<dDateString> Any date

Returns

<dDate> String notation of the date

Description

This function returns the value of <dDateString> as a character string in the format of YYYYMMDD. If the value of <dDateString> is an empty date, this function will return eight blank spaces.

Examples

      ? DToS( Date() )

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

DTOC(), DATE(), DTOS()