I have an AJAX request that returns an array, in this array I capture the created_at from my database and it comes in the following format:
Code:
success: function(response){
let data = response;
date = data[0][`created_at`];
console.log(date);
}
log:
2022-08-25T18:44:48.000000Z
I need to split this string into two variables (date and time), what is the best way?