Answers for "mongodb date before 2 days"

1

mongodb date before 2 days

// 2 days before
"StartDate" : { "$lt" : new Date(ISODate().getTime() - 1000 * 86400 * 2) }
Posted by: Guest on August-28-2020
1

mongodb date before 2 days

query = {
    timestamp: { // 18 minutes ago (from now)
        $gt: new Date(ISODate().getTime() - 1000 * 60 * 18)
    }
}
Posted by: Guest on August-28-2020

Browse Popular Code Answers by Language