I new to nodejs and trying implement mongodb insert of current timestamp as milliseconds using nodejs its getting inserted as double value. Can anyone help me how to insert this as NumberLong value.
var data = {
myId : uniqueId,
Timestamp : Date.now(), ---> This one is getting inserted as double.
userData : applicationData
}
}
I also try to insert like this but its getting insert as String.
var mongo=require('mongodb');
var Long = mongo.Long;
var data = {
myId : uniqueId,
Timestamp : Long.fromString((Date.now() + "")), ---> This one is getting inserted as String.
userData : applicationData
}
}
NumberLongvalue? can you give an example?