I have a date input while I am inserting it into mongodb it is inserting as a string (“2022-06-02T05:30:00.000Z”). I want to insert it as a date type like 2022-06-01T12:00:00.000+00:00
Does anyone have an idea?
Hello! If the data type should be Date in MongoDB, try using "myDate": {"$date": "2022-06-02T05:30:00.000Z" }
in your Insert query.