db.collection.find().forEach(doc => {
var istDate = new Date(doc.createdAt).toLocaleString("en-IN", { timeZone: "Asia/Kolkata" });
db.collection.updateOne(
{ _id: doc._id },
{ $set: { formattedDate: istDate } }
);
});
Sign up here with your email
.Net tips,.Net Interview Tips,Sql Server,Jquery,Javascript notes,AngularJS,Asp.net,Ajax
ConversionConversion EmoticonEmoticon