You will need to create a spreadsheet to record the START/END time
Example:
https://docs.google.com/spreadsheets/d/1to-j1jFiJMG70G_pgpyc2Tb-Mcd0RomUaLNY7zO_Fjg/edit?usp=sharingThis spreadsheet records a moment the user click on the link to open the form.
The form link is displayed in a WebApp. When clicked, the data is recorded in DB worksheet.
In Form, use this Script:
function createTrigger() {
const form = FormApp.openById('ID FORM HERE');
ScriptApp.newTrigger('finish')
.forForm(form)
.onFormSubmit()
.create();
}
function finish() {
// find position and save
const ss = SpreadsheetApp.openById('ID SHEET TO REGISTER'); // Sheet to write END time
const db = ss.getSheetByName("DB");
let timeZone = Session.getScriptTimeZone();
let date = Utilities.formatDate(new Date(), timeZone, 'dd/MM/yyyy HH:mm:ss');
let email = Session.getEffectiveUser().getEmail();
//find user in DB
const userCol = db.getRange(1, 2, db.getLastRow(), 1).getDisplayValues();
let c = 0;
while(userCol[c] != email){
c++;
}
db.getRange(c + 1, 3).setValue(date);
}
Execute createTrigger() to active trigger to get END time.