我有这个MongoDB文件.在JSON中:
{
"attString":"hello World0",
"attInt":0,
"attDate":new Date("1990-7-20")
}
如何使用mongoimport
将此文档导入MongoDB?attDate字段有问题.
这里是MongoDBshell 通知:
失败:在文档上解组字节时出错#1:意外的ISODate
我有这个MongoDB文件.在JSON中:
{
"attString":"hello World0",
"attInt":0,
"attDate":new Date("1990-7-20")
}
如何使用mongoimport
将此文档导入MongoDB?attDate字段有问题.
这里是MongoDBshell 通知:
失败:在文档上解组字节时出错#1:意外的ISODate
您必须更改JSON中的日期格式
Either
{"attString":"hello World0","attInt":0,"attDate":ISODate("2013-11-20T23:32:18Z")}
OR
{"attString":"hello World0","attInt":0,"attDate":{"$date":"2013-11-20T23:32:18Z"}}
希望能有所帮助