Bob.Tern
Posts: 11
Joined: Wed Nov 15, 2023 7:02 am

date in table issue

Hello again, I want to thank you for your help so far :), I was just wondering about the dates stored in the database: for e.g. "2024-02-28T00:00:00.000Z". When I get this data into my app and want to show it in a table, is there anyway to manipulate this date. for example to get rid of everything after the "T" to read "2024-02-28". I have used the split method to try and do this in my custom type script in mapping but doesn't seem to work. Thanks
aantsypau
Posts: 17
Joined: Wed May 24, 2023 7:57 am

Re: date in table issue

To do this in the mapping you need to select gear icon and add Custom TS with code
return value.split('T')[0];
see image below
Attachments
img-2024-03-03-11-04-45.png
img-2024-03-03-11-04-45.png (4.48 KiB) Viewed 864 times
img-2024-03-03-11-03-06.png
img-2024-03-03-11-03-06.png (45.03 KiB) Viewed 864 times
img-2024-03-03-11-03-57.png
img-2024-03-03-11-03-57.png (45.22 KiB) Viewed 865 times

Return to “Issues”