I am trying to run this:
mongoexport.exe -h *MYHOST* -p *MYPORT* -q "{'time':{'$gte': ISODate('2014-12-21 12:57:00.506Z'),'$lt': ISODate('2014-12-21 12:59:00.506Z')}}"
Or this (gte and lt without - '):
mongoexport.exe -h *MYHOST* -p *MYPORT* -q {'time':{$gte: ISODate('2014-12-21 12:57:00.506Z'),$lt: ISODate('2014-12-21 12:59:00.506Z')}}
The request works fine on Robomongo, but with mongoexport it throws: "too many positional arguments"
I know that I can run the following instead. But I do not want to use a date converter every time I need to execute a query.
mongoexport.exe -h *MYHOST* -p *MYPORT* -q "{'time':{$gte: new Date(14191 66620506),$lt: new Date(1419166740506)}}"
source share