I am struggling with a potential minor issue in google Sheets. I simply want to copy a date value to another cell, without changing the date format, etc.
However, if I save the date in a var, the Logger finds "Range". I also tried formatting, but I ended up with wrong dates, current dates, or just nothing at all.
Hint: Cell 63,4 contains a date value, formatted as a date in the spreadsheet.
function test() {
var as = SpreadsheetApp.getActiveSpreadsheet();
var ss = as.getActiveSheet();
var start = ss.getRange(63,4);
var row = start.getRow();
var col = start.getColumn();
Logger.log(start);
start = new Date(0);
ss.getRange('C2').setValue(start);
...
}
After running this code, the log shows "RANGE".
Do you have an idea how to solve this? I think I am not saving the cell correctly, but I did not find any further ideas.