Correct me if I'm wrong. I'm really not sure if what you're trying to do. Are you trying to create a unique visitor graph or are you simply trying to display the unique Visitors for that current month? However, I think MongoDB timestamp is much similar to javascript time stamp. MongoDB has some built-in command to convert it however you can just as easily do this with javaScript.
var objectIdFromDate = function (date) { return Math.floor(date.getTime() / 1000).toString(16) + "0000000000000000"; }; var dateFromObjectId = function (objectId) { return new Date(parseInt(objectId.substring(0, 8), 16) * 1000); };