Insert Hour and Minute to mongoDB date in node js

Oops

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

VPC

Use it like

var date = new Date();
date.setHours(08, 30);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

node.js to insert into mongodb

How to insert only hour and minute into table?

Convert Time Stamp into date, time, hour, minute

Set date, day, hour, minute, second interval

Nested insert in Mongodb with Node.js

Extracting date, hour and minute from Instant.now() generated date

node.js mongodb filter based on date

Mongodb Node.js $lookup with date and $match

Node.js / MongoDB Filter date range

How to calculate total time in oracle forms using date, hour and minute?

How to get current moment in ISO 8601 format with date, hour, and minute?

A little help for a correct date + hour:minute like Oracle for Postgresql

google analytics api need exact date, hour and minute

How to extract the hour, minute and seconds in a POSIX (ignoring the date)

Parse date in String format to Gregorian Calendar, with hour and minute

Python count down timer for date, hour, minute and second

Data Studio Date Range Filter on hour, minute level

MapperParsingException: No handler for type [date_hour_minute_second] declared on field

SQL extracting hour and minute from date into a single column

Combine date, hits.hour & hits.minute field

SQL group records by date/hour/minute and join table

SQL: select date rows that contain specific hour and minute

Add seconds to current date/time and generate only hour/minute/seconds

Update Hour (not date) in MongoDB Date Object

Get and merge all the documents in MongoDB which were inserted in the last minute by using Node.js

MongoDB date insert

Time (hour, minute) format localization in moment.js

How to insert array to mongodb using node.js

Node.js and MongoDB if document exact match exists, ignore insert