MongoExport将ISO日期转换为数字值

时间:2012-03-23 10:37:15

标签: mongodb date

我使用以下mongo导出查询导出某些记录,问题是我的日期为{“$ date”:1332318976777},有没有办法可以以正确的日期格式获取日期:

 -bash-3.2$ ./mongoexport -v --cmyCollection --csv -f "d","reportType","reportDatetime" -q '{"reportDatetime":{"$gte":new Date(1332288000000),"$lt":new Date(1332374400000)}}' -o/outputpath

在这方面的任何帮助都将受到高度赞赏。

谢谢,

Vaibhav Goswami。

1 个答案:

答案 0 :(得分:0)

请在此问题上查看此主题。看起来您要么需要对其进行后期转换,要么升级您的客户端。 Using MongoExport, how do I control the output of Date fields?

相关问题