I am trying to use an aggregation command to extract a monthly summary of data.This projection works....'$project'=>{'update'=> {:year =>{ "$year" => "$fcsDate" },:month =>{ "$month" => "$fcsDate" }},'projectName'=>1,'fcsDate'=>1,}},{"update":{"month":10,"year":2013},"fcsDate":"2013-10-14T00:00:00Z","_id":"519d06cf0c80e16a3800002f","projectName":"Project 3"}
....What I really want is:{"update":"2013-10","fcsDate":"2013-10-14T00:00:00Z","_id":"519d06cf0c80e16a3800002f","projectName":"Project 3"}
But concat doesn't seem to work with numbers:{'$project'=>{'update'=> {:year =>{ "$year" => "$fcsDate" },:month =>{ "$month" => "$fcsDate" }},'projectName'=>1,'fcsDate'=>1,}},{'$project'=>{'month'=> { "$concat" => [ "$update.year","-","$update.month"]},'projectName'=>1,'fcsDate'=>1,}},/Library/Ruby/Gems/1.8/gems/mongo-1.8.6/lib/mongo/db.rb:548:in `command': Database command 'aggregate' failed: (errmsg: 'exception: $concat only supports strings, not NumberInt32'; code: '16702'; ok: '0.0'). (Mongo::OperationFailure)from /Library/Ruby/Gems/1.8/gems/mongo-1.8.6/lib/mongo/collection.rb:667:in `aggregate'from tree.rb:25is there a function to convert a number to a string?Steve--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.