Equinox Online Help - Language Reference - A to Z

Home

Date

Applies to
SyntaxDate VariableDescriptions
Action[Statement] Declares date variables
ScopeUsable anywhere
Notes

This statement declares date variables. A new variable can be described using one of the two following formats.

  • VariableName
  • VariableName (date format)

VariableName is the name of the new variable. The date format can be any of the following predefined constants:

ddmmyyddmmmyyddmmyyyyddmmmyyyy
ddyymmddyymmmddyyyymmddyyyymmm
mmddyymmmddyymmddyyyymmmyyyydd
mmyyddmmmyyddmmyyyyddmmmddyyyy
yyddmmyyddmmmyyyyddmmyyyyddmmm
yymmddyymmmddyyyymmddyyyymmmdd

If the date format is not defined, Equinox assigns the ddmmyy format by default.

Many date variables can be declared using one date statement, by adding further variable descriptions; variable descriptions are separated by a comma.

N.B. date formats usually apply to the display, however if you change the date format of a variable to YYYYMMDD for example, you will need to assign a value to that variable as if it were a string not a date variable eg :

Date mydate(yyyymmdd)
mydate="2014-01-01"

normally for a date variable you would use single quotes.

CategoryDeclarations
See Also Define, Logical, Memo, Number, Procedure_EndProcedure, Public, Radio, String, Time
Example

This example shows various different ways to declare a date variable.

Date birthday, christmas | two variables
Date international(yymmdd), ukdate(ddmmmyy)
christmas = Dmy(25, 12, Today)