我想将mongodb中的日期字段转换为我可以从数据库中检索日期的位置,但是我得到了一个错误,这是请求:
# Main window
root = Tk()
root.title("Restaurants")
root.geometry("800x500")
lines of codes..... where user will select if they want to set the date
and time
# Popup window
def date_time():
popup = Tk()
popup.title("Set Date and Time")
popup.geometry("500x500")
popup.grab_set() # Not working
lines of codes to run
错误是:db.getcollection('collection').find({ $toDate: date : {$eq:"2018-03-02"} })
PS: 日期存储在mongodb中为:2018-03-02T15:38:48.115
有什么建议吗?