[DOCS-5865] Comment on: "manual/reference/operator/aggregation/dateToString.txt" Created: 17/Jul/15  Updated: 03/Nov/17  Resolved: 18/Jul/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

win 7 64
mongodb 3.0.1

Location: http://docs.mongodb.org/manual/reference/operator/aggregation/dateToString/#exp._S_dateToString
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36
Referrer: http://docs.mongodb.org/manual/reference/operator/aggregation/
Screen Resolution: 1366 x 768
repo: docs
source: reference/operator/aggregation/dateToString


Participants:
Days since reply: 8 years, 30 weeks, 5 days ago

 Description   

when i use 3.0.1
> db.REAL.aggregate([{$project:{day:{$dateToString:{format:"%Y-%m-%d",date:"$_ge
n_time"}}}}])
assert: command failed:

{ "errmsg" : "exception: invalid operator '$dateToString'", "code" : 15999, "ok" : 0 }

: aggregate failed
Error: command failed:

{ "errmsg" : "exception: invalid operator '$dateToString'", "code" : 15999, "ok" : 0 }

: aggregate failed
at Error (<anonymous>)
at doassert (src/mongo/shell/assert.js:11:14)
at Function.assert.commandWorked (src/mongo/shell/assert.js:254:5)
at DBCollection.aggregate (src/mongo/shell/collection.js:1278:12)
at (shell):1:9
2015-07-18T07:45:44.422+0800 E QUERY Error: command failed:

{ "errmsg" : "exception: invalid operator '$dateToString'", "code" : 15999, "ok" : 0 }

: aggregate failed
at Error (<anonymous>)
at doassert (src/mongo/shell/assert.js:11:14)
at Function.assert.commandWorked (src/mongo/shell/assert.js:254:5)
at DBCollection.aggregate (src/mongo/shell/collection.js:1278:12)
at (shell):1:9 at src/mongo/shell/assert.js:13

does the operator "$dateToString" avaliable in 3.0.1 ?


Generated at Thu Feb 08 07:51:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.