當我使用以下格式保存在MongoDB中的日期時間,它表明:如何在MongoDB中保存新的Date()?
Error "Unable to parse JSON"
{
"_id" : ObjectId("58cb759805aeeae37a56dd3d"),
"name" : "Plutus",
"admin" : "type 1",
"created" : new Date()
}
請幫我在上面的格式使用MongoDB的保存日期時間Robomongo。在畫面
錯誤描述:
感謝
您可以包括架構定義 – GPX
是的,我定義的架構定義 代碼如下 ?var mongoose = require('mongoose'); //定義我們的網站架構 var SiteSchema = new mongoose.Schema({name:String, admin:String, created:Date }); //導出Mongoose模型 module.exports = mongoose.model('Site',SiteSchema); –
謝謝;你可以在原來的文章中包含這個嗎?你能粘貼原始的堆棧跟蹤嗎?你有一個錯誤,我肯定不是最初的錯誤。 – GPX