How do I add a timestamp in the format hh:mm:ss in column B (instead of "null")
const values = [[new Date(), null, text]];
const firstBlankCell = sheet.getRange(sheet.getLastRow() + 1, 1);
firstBlankCell
.offset(0, 0, values.length, values[0].length)
.setValues(values)
.setNumberFormat('dd.MM.yyyy');
I have tried having new Date()
again instead of null
but then I can't get it to have a different format from the first instance.