[英]Google Scripts - Adding Days to Date -
您可以嘗試在提交表單時寫下日期。 使用Form Submit Trigger 來運行這個函數:
function newRow() {
var sprsheet = SpreadsheetApp.openById("your sheet Id");
var sheet = sprsheet.getActiveSheet();
var lastRow = sheet.getLastRow();
//Gets the current date and adds 7 days to it
var date = new Date();
var value = new Date(date.setDate(date.getDate()+7));
//"10" is the J column
sheet.getRange(lastRow, 10).setValue(value);
}
參考:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.