diff --git a/docs/03.reference/01.functions/datetimeformat/_arguments/mask.md b/docs/03.reference/01.functions/datetimeformat/_arguments/mask.md index f3b52be55..01a29917c 100644 --- a/docs/03.reference/01.functions/datetimeformat/_arguments/mask.md +++ b/docs/03.reference/01.functions/datetimeformat/_arguments/mask.md @@ -49,5 +49,7 @@ The following masks can be used to format the full date and time and may not be - long: medium followed by three-letter time zone; i.e. "mmmm d, yyyy h:nn:ss tt zzz" - full: equivalent to "dddd, mmmm d, yyyy h:nn:ss tt zz" - ISO8601/ISO: equivalent to "yyyy-mm-dd'T'HH:nn:ssXXX" +- epoch: Total seconds of a given date (Example:1567517664) +- epochms: Total millseconds of a given date (Example:1567517664000) The function follows Java date time mask. For details, see the Java documentation section [Date and Time Patterns](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html). \ No newline at end of file diff --git a/docs/03.reference/01.functions/datetimeformat/_examples.md b/docs/03.reference/01.functions/datetimeformat/_examples.md index ba098e37c..dd2fc5a1a 100644 --- a/docs/03.reference/01.functions/datetimeformat/_examples.md +++ b/docs/03.reference/01.functions/datetimeformat/_examples.md @@ -10,6 +10,8 @@ writedump(dateTimeFormat(now(), "mm/dd/yyyy")); writedump(dateTimeFormat(now(), "MM/DD/YYYY")); writeDump(dateTimeFormat(now(), "EEEE-dd,mm,yyyy")); + writeDump(dateTimeFormat(dateandtime, "epoch")); + writeDump(dateTimeFormat(dateandtime, "epochms")); //Member function dt=createDate(2015,04,14); @@ -19,4 +21,8 @@ writedump(dt.dateTimeFormat("short")); writeDump(dt.dateTimeFormat("GG-dddd, dd/mmm/yyyy,hh:nn:ss tt,zzzz")); writeDump(now().dateTimeFormat("ISO8601")); + writeDump(dt.dateTimeFormat("epoch")); + writeDump(now().dateTimeFormat("epoch")); + writeDump(dt.dateTimeFormat("epochms")); + writeDump(now().dateTimeFormat("epochms")); ``` \ No newline at end of file