var sheetdate = activeSheet.getRange(x, y).getValue() I was using this line to read a date from google sheets. Date in sheets is 2021-02-01. But sheetdate is returning value