title: Format a Google Sheets cell in plaintext via Apps Script
body: <p>Using Google Apps Script, I want to set the format for a Google Sheets cell to plain text.</p>
  
  <p>The reason I want to do this is because I want to show a date in the U.S. date format (MM/DD/YYYY). <em>[We can assume the locale in the OP's Google account is set to use DD/MM/YYYY, a more common date format. –Ed.]</em></p>
  
  <p>I create the string like this:</p>
  
  <pre><code>var thisDate = Utilities.formatDate (new Date (), SpreadsheetApp.getActiveSpreadsheet (). getSpreadsheetTimeZone (), "MM / d / yyyy");
  </code></pre>
  
  <p>... which returns the date in the U.S. format, <em>06/13/2012</em>, which is what I want. However, when I set the value of a cell to that string:</p>
  
  <pre><code>sheet.getRange (1, n). setValue (thisDate);
  </code></pre>
  
  <p>... the date is formatted into the cell according to my locale, <em>13/06/2012</em>, not the U.S. format.</p>
  
  <p>The following operation also fails, because the date is returned in the standard format, not the U.S. format:</p>
  
  <pre><code>sheet.getRange (1, n). getValue () == "06/13/2012"
  </code></pre>
  
  <p>When the cell is formatted as plain text, and not a date, everything works fine. </p>
  
  <p>So, my question is, how to format a cell using JavaScript.</p>