I need to store dates, the time is irrelevant(only need YYYY-MM-DD). I was wondering in which format should I store this. At the moment I store as a Date Object(ISO-8601) and if the date comes with some specific time I set that date to time 00:00:00(start of date).
This is what I do with the Moment.js
let dateToBeInserted = moment(date).startOf("date").toDate()
Or Should I simply store as string with the "YYYY-MM-DD" format or continue with this way?