title: button to Writing actual date and hour in selected cell
body: <p>I wanted  to create function to write in selected cell, the actual date and hour, like writing manually the formula "=now()" in cell. but through a button.</p>
  
  <p>Something like that, but actually doesn't work, nothing happen.</p>
  
  <pre><code>function botao(value) {
  
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheets()[0];
  
    var date = setValue('=now()');
  
    return date
  
    // Returns the active cell
    var cell = sheet.getActiveCell();
    // try to write date to the active cell as a value.
    cell.setValue(date);
  }
  </code></pre>