SET DATEFORMAT
From Lianjapedia
Contents
Purpose
Determine UI date formats for datetextbox formitems and grid columns
Syntax
SET DATEFORMAT ON | OFF | (<expL>)
SET DATEFORMAT TO <expC>
See Also
Advanced Canvas Control Attributes, Canvas Section Attributes, CTOD(), DATE(), DMY(), DTOC(), DTOS(), DTOV(), Form Section Attributes, Grid Column Attributes, Grid Section Attributes, LOCALE(), MDY(), SET CENTURY, SET DATE, SET EPOCH, SET MARK, STOD(), VTOD()
Description
The SET DATEFORMAT command can be used to configure the date format for datetextbox formitems and grid columns.
The <expC> is the format string comprising the following:
Format | Description |
---|---|
d | day as number without a leading zero (1 to 31) |
dd | day as number with a leading zero (01 to 31) |
ddd | abbreviated localized day name (e.g. 'Mon' to 'Sun') |
dddd | long localized day name (e.g. 'Monday' to 'Sunday') |
M | month as number without a leading zero (1-12) |
MM | month as number with a leading zero (01-12) |
MMM | abbreviated localized month name (e.g. 'Jan' to 'Dec') |
MMMM | long localized month name (e.g. 'January' to 'December') |
yy | year as two digit number (00-99) |
yyyy | year as four digit number |
or using a preset format:
Preset | Format |
---|---|
AMERICAN | M/d/yyyy |
ANSI | yyyy.MM.dd |
BRITISH | d/M/yyyy |
DMY | d/M/yyyy |
FRENCH | d/M/yyyy |
GERMAN | dd.MM.yyyy |
ISO | yyyy-MM-dd |
ITALIAN | dd-MM-yyyy |
JAPAN | yyyy/M/d |
MDY | M/d/yyyy |
USA | M-d-yyyy |
YMD | yyyy/M/d |
Example
set dateformat on set date to locale //or set dateformat to "d.MM.yyyy" //or set dateformat to "GERMAN"