title: Static TIMESTAMP for Google Sheets
body: <p>In the spreadsheet, need a button that writes the <strong>sheet's timezone</strong> current time and date in a cell, so everytime the button is pressed the timestamp is updated in that specific cell.</p>
  
  <p>After trying different scripts, rejecting some because they don't use the format dd/mm/yyyy hh:mm:ss or do not allow the change of format, reached this point:</p>
  
  <pre><code>function TIMESTAMP() {
    SpreadsheetApp.getActiveRange().setValue(new Date());
    var sheet = SpreadsheetApp.getActiveSheet();
    var addedDate = sheet.getRange(1,1).getValue();
    var addedTime = Utilities.formatDate(addedDate, SpreadsheetApp.getActive().getSpreadsheetTimeZone(), "hh:mm a");
  }
  </code></pre>
  
  <p>when the button, with the script, is pressed the timestamp with the correct timezone shows in the current active cell BUT an error shows up:</p>
  
  <p><em>Exception: The parameters (String,String,String) don't match the method signature for Utilities.formatDate.</em></p>
  
  <p>How to designate the cell where the Timestamp should show up, make its values update everytime the button is pressed and solve the parameters error? </p>