I have the following requirement,where I need to fetch the data using the timestamp. The time stamp has Date and Time.I want to fetch only the Date.Please find the screen shot attached.I wrote the query as
db.General_Liability.aggregate({
$project : {
new_time_stamp : {$substr : ["$session.Datestamp",0, 2]}
}
});
On querying the new time stamp is showing as empty.Please help me with this