title: Google Apps Script on Form Submit Time Formatting Glitch/Fix
body: <p><strong>Background:</strong></p>
  
  <p><em>How:</em> I suspect that this is a glitch within Google Form (submission process)/Spreadsheet, but may be part of the Date conversion utility of the Spreadsheet interface (and is an intended feature).</p>
  
  <p>When entering a format in a <em>text box in Google Forms</em>, there is some sort of communication error between the Form submit and Response Spreadsheet, or pre-processing of the Form's data before it is sent to the spreadsheet. The glitch only seems to happen for data in a text field of the format <code>##:## TEXT</code> where <code>TEXT</code> contains <strong>no '.' characters</strong>. For example: <code>4:15 pm</code> will reproduce the glitch, but <code>4:15 p.m</code> and <code>4:15 p.m.</code> will not.</p>
  
  <p><em>Result:</em> An <em>apostrophe</em> character is added to the beginning of the string when it is put into the Spreadsheet (i.e. <code>'4:15 pm</code>) which throws off several sub-systems I have in place that use that time data. Here are two screenshots (sorry for the bad sizing on the second):</p>
  
  <p><img src="https://i.stack.imgur.com/NWeQO.png" alt="G1"><img src="https://i.stack.imgur.com/ZGCsb.png" alt="G2"></p>
  
  <p>I'm 99% certain that the glitch is caused by the <code>##:</code> combination.</p>
  
  <p><strong>Temporary Fix?:</strong> The real question is... how might I go about removing that pesky apostrophe before I start manipulating the time data? I know how to getValue() of a cell/Range. Assume I have the value of a cell in the following manner:</p>
  
  <pre><code>var value = myRange.getValue();
  // value = '4:15 pm
  </code></pre>
  
  <p>How can I go about processing that value into <code>4:15 pm</code>? A simple java function could be</p>
  
  <pre><code>value = value.substring(1); // Assuming "value" is a String
  </code></pre>
  
  <p>But in Google App Scripts for <em>Spreadsheets</em>, I don't know how I would do that.</p>
  
  <p><strong>Post-Script:</strong> It is necessary to post-process this data so that I don't have to lecture university faculty in the language department about inputting time format correctly in their forms.</p>
  
  <p>Thanks in advance to those who can help!</p>