-
-
Notifications
You must be signed in to change notification settings - Fork 36
setDateFormats
Julian Halliwell edited this page Aug 5, 2023
·
1 revision
Allows the date masks used by the current library instance to be set.
setDateFormats( dateFormats )
-
dateFormats
struct: including one or more of the following keys:DATE
,TIME
,TIMESTAMP
,DATETIME
.
The following international date masks are used by default to read and write cell values formatted as dates:
- DATE =
yyyy-mm-dd
- TIME =
hh:mm:ss
- TIMESTAMP =
yyyy-mm-dd hh:mm:ss
An additional mask is used to output datetime values from the read()
method into HTML or CSV formats:
- DATETIME =
yyyy-mm-dd HH:nn:ss
NB: Do not confuse DATETIME
and TIMESTAMP
. In general you should override the TIMESTAMP
mask.
spreadsheet = New spreadsheet();
USDateFormat = { DATE: "mm/dd/yyyy" };
spreadsheet.setDateFormats( USDateFormat );