I am using below query
var cursor =db.getCollection(‘user_info’).find({})
while (cursor.hasNext()) {
var record = cursor.next();
print(record.Login +’|’+ record.Email +’|’ + record.LastLoginDate )
}
Query is pulling back the right fields with no problem, but not in the right time format – even though when looking at the field in its normal state, it is in the right format.
Example:
Sun Dec 15 2019 18:50:37 GMT-0800 (PST) <-- query returns this
ISODate(“2020-04-01T19:29:27.522Z”) **<-- field contains this
** Any ideas about how to adjust the query to return the date fields in this format?
YYYY-MM-dd’T’HH:mm:ss.SSS