title: Read emails on specific date using google app script
body: <p>Hello guys I am working on a project where I want to read emails from gmail inbox on a specific date. I have referred the official <a href="https://developers.google.com/apps-script/reference/gmail/gmail-app?hl=ja" rel="nofollow noreferrer">documentation</a> but it hasn't been much helpful to me.</p>
  
  <pre><code>var master = SpreadsheetApp.openById(&lt;SPREADSHEET_ID&gt;);
  var demosheet = master.getSheetByName("demo");
  var newDate = Utilities.formatDate(new Date(), "GMT+5:30", "dd/MM/YYYY");
  var getdate = demosheet.getDataRange().getValues();
  var firstThread = GmailApp.getInboxThreads(0,1)[0];
  //to get date from spreadshet
  for(i=2;i&lt;getdate.length;i++)
  {
  Logger.log(firstThread.getLastMessageDate(getdate[i][0]));  }}
  </code></pre>
  
  <p>Can anyone please help, thanks in advance.</p>