In Mongodb I have a field representing a timestamp (milliseconds since 1970), but it is in fact a long saved from Python.
I now want to get all entries done after a certain time. I cannot find a way though how to get the current time as a timestamp in a mongo shell style. One thing I've tried e.g. was:
use binfut;
db.getCollection("liq").aggregate(
[
{
"$match" : {
"coin" : "BTC-USDT",
"side" : "SELL",
"timestamp" : {
"$lte" : ISODate("2018-10-02T01:11:18.965+0000")
}
}
}
],
{
"allowDiskUse" : false
}
);
But I also used new Date(), etc.
Is there a way to get this done?