I have been trying to save the date from javascript side into MongoDB in ISODate format. But it just saves the date field in my MongoDB document in string format.
Here is the object I'm sending into the MongoDB to be saved as a document in a given collection.
var currentDate = new Date();
postData = {
deviceID: deviceID,
companyID: companyID,
userID: userID,
date: currentDate
};
Everything works fine except the date field is just saved in String format. Couldn't find any SO question which could give a clear answer for this problem as well, if there is a one please direct me to the proper place!