title: Google script -- adding days to a date
body: <p>I realize this is likely very easy but I'm a struggling newbie.  I have dates in spreadsheet cells D3, D4, and D5 (mm/dd/yyyy) and simply need a macro to add 7 days to each of them.  I've managed to mangle together some code that may be working but the output is in milliseconds rather than mm/dd/yyyy format.</p>
  
  <p>I can't seem to get the syntax right to convert it. Any hints?  Thank you!</p>
  
  <pre><code>function UpdateDates() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getActiveSheet();
  
    var First = new Date();
    var Second = new Date();
    var Third = new Date();
  
    var First = ss.getRange('D3').getValue();
    var Second = ss.getRange('D4').getValue();
    var Third = ss.getRange('D5').getValue();
  
  
    ss.getRange('D3').setValue(First.getTime() + 7);
    ss.getRange('D4').setValue(Second.getTime() + 7);
    ss.getRange('D5').setValue(Third.getTime() + 7);
  
  }
  </code></pre>