更新MongoDB中的日期字段
我在名为“评论”的集合中有以下文档。我想更新过去的到期日期。减1天
{
"_id" : ObjectId("62bd783086e0ee2176477b93"),
"expiry" : ISODate("2022-09-28T10:17:20.455Z"),
"rating" : 5,
"category" : "Orange Pumpkin Namkeen",
"merchantId" : "220606131134369EZ0045009",
"customerName" : "The Man with the Yellow Hat",
"customerId" : "220606142940700EZ0043018",
"status" : "SUBMITTED",
"createdTime" : ISODate("2022-06-30T10:17:20.456Z"),
"modifiedTime" : ISODate("2022-06-30T10:20:51.955Z"),
"modifiedBy" : "ezestore"
}
有人可以帮我吗?
I have the below document in a collection named "review". I want to update the expiry date in the past. Minus 1 day
{
"_id" : ObjectId("62bd783086e0ee2176477b93"),
"expiry" : ISODate("2022-09-28T10:17:20.455Z"),
"rating" : 5,
"category" : "Orange Pumpkin Namkeen",
"merchantId" : "220606131134369EZ0045009",
"customerName" : "The Man with the Yellow Hat",
"customerId" : "220606142940700EZ0043018",
"status" : "SUBMITTED",
"createdTime" : ISODate("2022-06-30T10:17:20.456Z"),
"modifiedTime" : ISODate("2022-06-30T10:20:51.955Z"),
"modifiedBy" : "ezestore"
}
Can someone help me out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)