Lingo Dictionary > D-F > date() (formats) |
![]() ![]() ![]() |
date() (formats)
Syntax
date(
ISOFormatString
)
date(
ISOFormatInteger
)
date(
ISOFormatIntegerYear
,
ISOFormatIntegerMonth
,
ISOFormatIntegerDay
)
Description
Function and data type; creates a standard, formatted date object instance for use with other date object instances in arithmetic operations and for use in manipulating dates across platforms and in international formats.
When creating the date, use four digits for the year, two digits for the month, and two digits for the day. The following expressions are equivalent:
|
|
|
|
|
|
Addition and subtraction operations on the date are interpreted as the addition and subtraction of days.
The individual properties of the date object instance returned are:
|
|
|
|
|
|
Example
These statements create and determine the number of days between two dates:
myBirthDay = date(19650712)
yourBirthDay = date(19450529)
put "There are" && abs(yourBirthday - myBirthday) && "days between our birthdays."
Example
These statements access an individual property of a date:
myBirthDay = date(19650712)
put "I was born in month number"&&myBirthday.month
See also
![]() ![]() ![]() |