I am trying to remove time from the date format which is coming from the backend , what is correct approach to achieve this task? Its not a date object.
main.js
const date = "2020-08-05 00:08:00 "
console.log(date.split[0];
should output (but it is not happening):
"2020-08-05"