"DATE_FORMAT" function

Hi, I know we got a new function “DATE_FORMAT” for Calculated Field in February.
But I’m not sure how to use it…

Please share with me some samples.

Thanks!

First of all, the DATE_FORMAT function is basically a function that allows you to change the format of number (or field code) into a specified date format.

When using the DATE_FORMAT function, the following syntaxes are available (the default value of “time zone” is the system time zone):
 DATE_FORMAT(field code, date and time format, time zone)
 DATE_FORMAT(number (Unix timestamp), date and time format, time zone)

For the field code, you can use the following field:
 -Date and Time
 -Date
 -Time
 -Created Datetime
 -Updated Datetime
 -Number
 -Calculated

Let me give you few examples:

Example: Changing the number(eg.1459468800) into a date format
 Syntax:
  DATE_FORMAT(1459468800, “YYYY-MM-dd HH:mm”, “system”)

 Result:
  2016-04-01 00:00

Example:  Changing the time zone of Field A(eg.2017-03-02 1:00 JST) to Pacific Time Zone

 Syntax:
  DATE_FORMAT(‘Field A’, “YYYY-MM-dd HH:mm”, “America/Los_Angeles”)

 Result:
  2017-03-01 8:00

In the bottom of the following page, it explains about the DATE_FORMAT:
 https://help.kintone.com/en/k/user/autocalc.html