After logging into MongoDB server with shell, I try the following commands
rs1:PRIMARY> x = Date()
Thu Dec 12 2013 11:25:58 GMT+0800 (CST)
rs1:PRIMARY> x -1
NaN
rs1:PRIMARY> print(x)
Thu Dec 12 2013 11:25:58 GMT+0800 (CST)
rs1:PRIMARY> x - 1000
NaN
In MongoDB doc, http://docs.mongodb.org/manual/reference/bson-types/ the Date type is a 64bit integer which represents the mill-seconds since epoch. I want to show its value, but always get one string.