title: Google Apps Script date format issue (Utilities.formatDate)
body: <p>I am pretty new to Google Apps Script, so please bear with me. </p>
  
  <p>I am collecting daily interest rates from a bank on Google Sheets, and I am using the following code to append new rows for the rates contained in A5:F5, with column A containing dates.</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>function recordHistory() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheetByName("Interest Rates");
    var source = sheet.getRange("A5:F5");
    var values = source.getValues();
    values[0][0] = Utilities.formatDate(new Date(), "GMT+10:00", "yyyy-MM-dd");
    sheet.appendRow(values[0]);
  
  };
  </code></pre>
  
  <p>My issue is this - although I have specified the date format to be "yyyy-MM-dd" the dates in column A in my new rows are created in this format "M/dd/yyyy". </p>
  
  <p>I have tried pre-formatting entire column A with "yyyy-MM-dd" using the drop down Format menu in Google Sheets, but if I run the code above my new row is still in "M/dd/yyyy".</p>
  
  <p>It's as if my code ignores Utilities.formatDate completely. FYI I got the above code from <a href="http://www.gadgetsappshacks.com/2013/08/how-to-automatically-record-daily.html" rel="noreferrer">here</a>.</p>