# "DATE\_FORMAT" function

**URL:** <https://forum.kintone.dev/t/date-format-function/33>\
**Category:** General\
**Created:** [March 1, 2017, 4:54am UTC](https://forum.kintone.dev/t/date-format-function/33 "2017-03-01T04:54:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 1, 2017, 4:54am UTC](https://forum.kintone.dev/t/date-format-function/33/1 "2017-03-01T04:54:14Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 1, 2017, 4:11pm UTC](https://forum.kintone.dev/t/date-format-function/33/2 "2017-03-01T16:11:03Z")

</div>

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):  
&nbsp;DATE\_FORMAT(field code, date and time format, time zone)  
&nbsp;DATE\_FORMAT(number (Unix timestamp), date and time format, time zone)

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

Let me give you few examples:

Example: Changing the number(eg.1459468800) into a date format  
&nbsp;Syntax:  
&nbsp; DATE\_FORMAT(1459468800, “YYYY-MM-dd HH:mm”, “system”)

&nbsp;Result:  
&nbsp; 2016-04-01 00:00

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

&nbsp;Syntax:  
&nbsp; DATE\_FORMAT(‘Field A’, “YYYY-MM-dd HH:mm”, “America/Los\_Angeles”)

&nbsp;Result:  
&nbsp; 2017-03-01 8:00

In the bottom of the following page, it explains about the DATE\_FORMAT:  
&nbsp;[https://help.kintone.com/en/k/user/autocalc.html](https://help.kintone.com/en/k/user/autocalc.html)
