[DOCS-1268] Unable to insert via shell using the strict dates Created: 20/Mar/13 Updated: 03/Nov/17 Resolved: 16/Apr/13 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | auto | Assignee: | Kay Kim (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: http://docs.mongodb.org/manual/reference/mongodb-extended-json/ |
||
| Participants: | |
| Days since reply: | 10 years, 44 weeks, 1 day ago |
| Description |
|
db.bug.insert( } gives failed: field names cannot start with $ [$date] at src/mongo/shell/collection.js:L147 |
| Comments |
| Comment by Kay Kim (Inactive) [ 16/Apr/13 ] |
|
Hi Vlad – Please try db.bug.insert( { "dateTime": new Date("04-16-2013") }). Hope this helps. Regards, Kay |
| Comment by Vladislav Mickevic [ 03/Apr/13 ] |
|
We are using it not only from shell, but also from within the native JavaScript drivers. |
| Comment by Ed Costello [ 02/Apr/13 ] |
|
Kay can you review the extended JSON page http://docs.mongodb.org/manual/reference/mongodb-extended-json/#gsc.tab=0 and see if clarification is needed on fields like $date (which is valid in JSON import/export but not the mongo shell)? |
| Comment by Ed Costello [ 02/Apr/13 ] |
|
$date cannot be used in the shell, only in the REST interface and in the tools like mongoimport. |
| Comment by Vladislav Mickevic [ 27/Mar/13 ] |
|
Any news on this? We have the same issue. Mongo v 2.2.3. |