New to JavaScript dates and format and also using moment.js but I have the following date/time:
"2021-08-21 00:00:00"
but need to convert it to be this same date/time using moment.js, but in this format:
"2021-08-21T00:00:00.000Z"
To achieve the top date, I am using the following code:
let value = "00:00:00";
let cdt = moment(value, 'HH:mm:ss');
console.log(cdt.format('YYYY-MM-DD HH:mm:ss'))
Unsure what the .000Z
are at the end but can someone pls assist with conversion but keeping to same date and time as first date/time