Difference between revisions of "SET DATE"
From Lianjapedia
Yvonne.milne (Talk | contribs) (→Example) |
|||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
==Purpose== | ==Purpose== | ||
Determine input and output date formats | Determine input and output date formats | ||
− | |||
==Syntax== | ==Syntax== | ||
− | SET DATE [TO] AMERICAN | ANSI | BRITISH | DMY | FRENCH | GERMAN | ISO | ITALIAN | JAPAN | MDY | USA | YMD | + | SET DATE [TO] AMERICAN | ANSI | BRITISH | DMY | FORMAT <cISOlocale> | FRENCH | GERMAN | ISO | ITALIAN | JAPAN | LOCALE | LONG | MDY | SHORT | USA | YMD |
==See Also== | ==See Also== | ||
− | [[CTOD()]], [[DATE()]], [[DMY()]], [[DTOC()]], [[DTOS()]], [[DTOV()]], [[MDY()]], [[SET CENTURY]], [[SET | + | [[CTOD()]], [[DATE()]], [[DMY()]], [[DTOC()]], [[DTOS()]], [[DTOV()]], [[LOCALE()]], [[MDY()]], [[SET CENTURY]], [[SET DATEFORMAT]], [[SET EPOCH]], [[SET MARK]], [[STOD()]], [[VTOD()]] |
==Description== | ==Description== | ||
The SET DATE command specifies the input and output format for dates. The following summarizes the available date formats. | The SET DATE command specifies the input and output format for dates. The following summarizes the available date formats. | ||
− | + | {| class="wikitable" width="100%" | |
− | {| class="wikitable" | + | !width="60%"|Date||Format |
− | !Date||Format | + | |
|- | |- | ||
|AMERICAN (or MDY)||mm/dd/yy | |AMERICAN (or MDY)||mm/dd/yy | ||
Line 22: | Line 19: | ||
|- | |- | ||
|BRITISH or FRENCH or (DMY)||dd/mm/yy | |BRITISH or FRENCH or (DMY)||dd/mm/yy | ||
+ | |- | ||
+ | |FORMAT <cISOlocale>||Specified ISO locale code (from v6.0.2) | ||
|- | |- | ||
|GERMAN||dd.mm.yy | |GERMAN||dd.mm.yy | ||
+ | |- | ||
+ | |ISO||yyyy-mm-dd | ||
|- | |- | ||
|ITALIAN||dd-mm-yy | |ITALIAN||dd-mm-yy | ||
Line 29: | Line 30: | ||
|JAPAN or (YMD)||yy/mm/dd | |JAPAN or (YMD)||yy/mm/dd | ||
|- | |- | ||
− | | | + | |LOCALE||Current OS locale (from v6.0.2) |
+ | |- | ||
+ | |LONG||Long date format (from v9.2.6) | ||
|- | |- | ||
− | | | + | |SHORT||Short date format (from v9.2.6) |
+ | |- | ||
+ | |USA||mm-dd-yy | ||
|- | |- | ||
|} | |} | ||
− | |||
If SET CENTURY is ON, then the years will be formatted with four digits, i.e. yyyy. The SET MARK command may be used to specify an alternate character to separate the parts of a date. | If SET CENTURY is ON, then the years will be formatted with four digits, i.e. yyyy. The SET MARK command may be used to specify an alternate character to separate the parts of a date. | ||
− | |||
==Example== | ==Example== | ||
Line 46: | Line 49: | ||
set century on | set century on | ||
seek ctod("01.01.1998") | seek ctod("01.01.1998") | ||
+ | set date format "en_GB" | ||
+ | set date locale | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Set_Commands|DATE]] | [[Category:Set_Commands|DATE]] | ||
− | [[Category: | + | [[Category:Lianja v6.0]] |
− | [[Category: | + | [[Category:Lianja v9.2]] |
Latest revision as of 05:13, 18 September 2023
Contents
Purpose
Determine input and output date formats
Syntax
SET DATE [TO] AMERICAN | ANSI | BRITISH | DMY | FORMAT <cISOlocale> | FRENCH | GERMAN | ISO | ITALIAN | JAPAN | LOCALE | LONG | MDY | SHORT | USA | YMD
See Also
CTOD(), DATE(), DMY(), DTOC(), DTOS(), DTOV(), LOCALE(), MDY(), SET CENTURY, SET DATEFORMAT, SET EPOCH, SET MARK, STOD(), VTOD()
Description
The SET DATE command specifies the input and output format for dates. The following summarizes the available date formats.
Date | Format |
---|---|
AMERICAN (or MDY) | mm/dd/yy |
ANSI | yy.mm.dd |
BRITISH or FRENCH or (DMY) | dd/mm/yy |
FORMAT <cISOlocale> | Specified ISO locale code (from v6.0.2) |
GERMAN | dd.mm.yy |
ISO | yyyy-mm-dd |
ITALIAN | dd-mm-yy |
JAPAN or (YMD) | yy/mm/dd |
LOCALE | Current OS locale (from v6.0.2) |
LONG | Long date format (from v9.2.6) |
SHORT | Short date format (from v9.2.6) |
USA | mm-dd-yy |
If SET CENTURY is ON, then the years will be formatted with four digits, i.e. yyyy. The SET MARK command may be used to specify an alternate character to separate the parts of a date.
Example
set date german use patrons index dates seek ctod("01.01.98") set century on seek ctod("01.01.1998") set date format "en_GB" set date locale