Basically in MongoDB, Date() function is having 4 formats to format the ISODate:
new Date("<YYYY-mm-dd>")
The above code will return the ISODate with the date that you have specified.
new Date("<YYYY-mm-ddTHH:MM:ss>")
The above function will define the date and the time in the users' local timezone and it will return the ISODate with the defined datetime in UTC(Universal Time Coordinated).
new Date("<YYYY-mm-ddTHH:MM:ssZ>")
The above approach will define the date and the time in Universal Time Coordinated and it will return the ISODate with the specified date and time in UTC(Universal Time Coordinated).
new Date(<integer>)
The above code defines the date and the time in milliseconds because of the Unix epoch (Jan 1, 1970), and it will return the resulting ISODate state.