El formato de fecha actual: 2021-04-30T23:00:00.000Z
Cosas que se intentaron pero no funcionaron (new Date(startDate) new Date(startDate).toLocaleDateString()
El error
RangeError: Invalid time value var originalDate = toDate(dirtyDate); if (!isValid(originalDate)) { throw new RangeError('Invalid time value'); } // Convert the date in system timezone to the same date in UTC+00:00 timezone. // This ensures that when UTC functions will be implemented, locales will be compatible with them. // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376Esta es una representación de fecha ISO-8601 , puede convertirla pasándola al constructor de Date y llamar a funciones como getURChours() en el objeto
let date = new Date('2021-04-30T23:00:00.000Z'); console.log(date.getUTCHours()); // Hours console.log(date.getUTCMinutes()); // Minutes console.log(date.getUTCSeconds()); // Seconds