mongodb timestamp to date column code example
Example: mongodb check date only without time
db.collection.aggregate([{
$addFields: {
onlyDate: {
$dateToString: {
format: '%Y-%m-%d',
date: '$date'
}
}
}
},
{
$match: {
onlyDate: {
'$eq': onlyTodayDate
}
}
}
]);