title: Insert the result count number of days between two days in spreadsheet using google script
body: <p>How to put in a Cell the number of days pass from a specific date. For example:</p>
  
  <p>Column1: 12/05/2013 18:00:00 Actual Days using Function New Date() Column2: The script will insert the numbers of days (Today - Column1) = 4</p>
  
  <p>The script should be insert in the column 2 the number of days pass from today. Today is 16/05/2013 23:00, the script will insert 4. If possible due this?</p>
  
  <p>I'll appreciate if you can help me.</p>
  
  <p>That function was passed by friend but I think doesn't work because the date is not in milliseconds but the result in the cell should be number of days</p>
  
  <pre><code>    }
      function formatting2(event) {
        var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); // get the sheet
        var columnF = sheet.getRange(2, 1, sheet.getLastRow()-1, 1);
        var updateage = sheet.getRange(2, 2, sheet.getLastRow()-1, 1);
        var fValues = columnF.getValues(); // get the values
        var result = new Date();
  
        updateage.setValue(result-fValues)
      }  
  </code></pre>