I am trying to insert a date with user specific time. User will select any time say, 08:30 And I need to insert that time to mongodb with the current date. I am trying to insert it like this
new Date().setHours(08,30)
but this gives me something like this 1632272411458. And I need it to get inserted in the below format
2021-09-22T08:30:00.00+00:00
Use it like
var date = new Date();
date.setHours(08, 30);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments