javascript - Timestamp in Appscript? -



javascript - Timestamp in Appscript? -

i'm trying create timestamp within google sheets in appscript. whenever cell in columna updated, want current date/time placed in columnb.

tried using now() function updated cells.

same question post below in appscript not vba: excel now() shouldn't update existing timestamp

thanks!

function fillformulae(){ var ss = spreadsheetapp.getactivespreadsheet(); var sheets = ss.getsheetbyname("sheet1"); var lastusedrow = sheets.getlastrow(); (j=0; j < lastusedrow - 2; j ++ ){ var cell = sheets.getrange(3+j, 2); if (cell.getvalue() == '') { cell.setvalue(utilities.formatdate(new date(), "pst", "yyyy-mm-dd hh:mm:ss")); } } }

javascript google-apps-script google-spreadsheet

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -