db.messages.find().forEach(function(doc) {
doc.headers.datestamp = new Date(Date.parse(doc.headers.Date.toString()));
db.messages.save(doc);
})
This worked well to convert this sort of text:
Tue, 14 Nov 2007 03:22:00 -0800 (PST)
The text is from an email archive known as the Enron Corpus.