T
TanStack14mo ago
constant-blue

Table customization

Hi guys, I have a question about Tanstack React Table. I need to change the way the date appears in the cell. For example, I want to change the Date 2021-02-10T17:12:09.987826 to Feb 20, 2021, 05:12:09 PM. How can I do this? Without using any other 3rd party libraries.
1 Reply
foreign-sapphire
foreign-sapphire14mo ago
As mentioned in main
You could use the browser Intl.DateTimeFormat to achieve this. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
MDN Web Docs
Intl.DateTimeFormat - JavaScript | MDN
The Intl.DateTimeFormat object enables language-sensitive date and time formatting.

Did you find this page helpful?