Reputation: 817
I am using Gmail API and am getting the variables in Javascript. I can access the Date
but not the internalDate
.
var inDate = getHeader(message.payload.headers, 'internalDate');
console.log(inDate);
it does not log anything; the string is empty. But when I log the Date
, it logs the date like this: "Sun, 15 Jul 2018 21:41:56 +0000"
var Date = getHeader(message.payload.headers, 'Date');
console.log(Date);
Now, how do I get the internalDate
?
Upvotes: 0
Views: 1129
Reputation: 2387
Instead of accessing internalDate from message.payload.headers
, try to access the internalDate from message.internalDate
Eg:
var internalDateVal = message.internalDate;
Upvotes: 2