I’m trying to get the timestamp from an ObjectID, but Mongo keeps giving me this error. Am I missing an import? What’s the best way to convert the timestamp to a standard date format?
video['date'] = video['_id'].getTimeStamp()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Where’d you see
getTimeStamp()as a method?According to the docs it should just be: