In this article, we introduce how to use the Moment.js library, listed on the Kintone CDN. This library can be used to convert dates into a different format, such as converting it into a format of "xx days ago".
What is Moment.js?
Import Moment.js for you Kintone App
For more information on how to use the libraries in the CDN, read through this article.
Use Moment.js with Kintone
Once the Moment.js library has been imported, you can call the Moment.js methods within Kintone. Here are some examples:
Moment.js makes manipulating date formats very easy.
For more information on how to use the Moment.js library, refer to their docs.
Moment.js sample on Kintone
Click "Save" and "Update App" to view the changes in your Record list.
This code specifies a fieldcode of a datetime field in the App, and uses Moment.js to convert the date into a new format. The new format is placed in the Record List instead of the original date format.