# Date Field Format

**URL:** <https://forum.kintone.dev/t/date-field-format/310>\
**Category:** General\
**Created:** [March 27, 2020, 3:27am UTC](https://forum.kintone.dev/t/date-field-format/310 "2020-03-27T03:27:57Z")\
**Posts on this page:** 3\
**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 27, 2020, 3:27am UTC](https://forum.kintone.dev/t/date-field-format/310/1 "2020-03-27T03:27:57Z")

</div>

I would like to ask how to change the date field format in table to DD/MM/YYYY.

I have checked the posts below.  
[Change the Date field format](https://forum.kintone.dev/hc/en-us/community/posts/900000008363-Change-the-Date-field-format)  
[Customize date formats with Moment.js](https://forum.kintone.dev/hc/en-us/articles/115002348967-Customize-date-formats-with-Moment-js)

However I could not adopt these solution because kintone.app.getFieldElements() is not able to be used the field in table.  
Is there any ideas to change the date format in table?

---

<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 28, 2020, 12:30am UTC](https://forum.kintone.dev/t/date-field-format/310/2 "2020-03-28T00:30:29Z")

</div>

Hello Miyuki,

Since you cannot acquire the value of the table in kintone.app.getFieldElements(),  
you would have to use a different method to change the date format.  
It might have to be a customized one by using the DOM operation,  
and it also might be necessary to consider operating the table display and non-display.

Using Moment.js and jQuery, I was able to change the date format by using the following code.  
※ Assuming that there is only one date field within the table.

jQuery.noConflict();  
(function($) {  
“use strict”;  
kintone.events.on(“app.record.index.show”, function(e) {

$(’.recordlist-toggle-subtable-gaia.show’).on(‘click’, function() {  
var wEle = document.getElementsByClassName(“subtable-row-content-gaia”)[0];

wEle = wEle.getElementsByClassName(“recordlist-cell-gaia recordlist-date-gaia”)[0];  
console.log(wEle.innerText);

wEle.innerText = moment(wEle.innerText).format(‘DD/MM/YYYY’);  
});

});  
})(jQuery);

Hopefully, this solves the issue.

Sean

---

<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 30, 2020, 5:08am UTC](https://forum.kintone.dev/t/date-field-format/310/3 "2020-03-30T05:08:54Z")

</div>

Hello Sean,

I understood how to get elements for table field.  
Thank you so much for your reply.

Miyuki
