Dates (Duration) in Google Sheets Script
问题 I have a Google Sheet with three columns: - Date and time (timestamp) - Duration - Description I have an script that when I write something in 'Description', inserts in 'Date' the date and time at this moment, and the 'Duration': function onEdit(e) { if(e.source.getActiveSheet().getName() == "Sheet2" ) { var col = e.source.getActiveCell().getColumn(); if(col == 3 ) { // I'm in column three var cellTimeStamp = e.range.offset(0,-2); // First column of the same row var cellTimeDiff = e.range