I want to get the date data from the database as "dd.mm.mm.yyyy HH:mm".
How can I convert this data with Javascript?
Normally the date data comes as follows,
2023-08-14T15:20:59.659667+03:00
The format I want it to be,
14.08.2023 20:59
Js code side,
tablerow = $('<tr/>');
tablerow.append(`<td class="border-bottom-0">${value.createDate}</td>`);
Can you help me?
Thanks,
I did not encounter any errors.
2
Answers
Try This:
You can use this function to format the date:
Note: dateToFormat should be in string format