I want to get a certain date format I receive : "15/03/2016"
and I want to get this format2016-03-15T00:00:00+01:00
I have tried with:
dateStart = new Date(filterDateStart.split('/').reverse().join('/'));
dateStart = new Date(filterDateEnd).toLocaleDateString();
dateStart = new Date(filterDateStart).toISOString();
dateStart = new Date(filterDateStart.split('/').reverse().toISOString('/'));
None work for me...
I think the easiest way to format would be to use the moment.js library :
In an Angular project:
npm i moment
.In the file (component or service) you import it like this: