Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
「end_date」フィールドに基づいて、現在の日付より後のすべてのドキュメントを取得しようとしています。
私はこれを使用しています:
db.collection.find({end_date: {$gte: new Date()}})
しかし、近くで構文エラーが発生します `{end_date:'
`{end_date:'
構文は正しいようです - 何か不足していますか?
ありがとうございました!
この構文は私にとってはうまく機能します:
derick@whisky:/tmp$ mongo MongoDB shell version: 2.0.3 connecting to: test > use demo switched to db demo > db.collection.find({end_date: {$gte: new Date()}}) >