Has anyone figured out the formula in Sheets to convert the zulu time that is captured in the App:Logins sheet when a user log into a Glide app into local time? I suppose splitting the column at T, stripping out the Z and converting the time manually will do it, but you have to repeat that every time someone logs in.
Thank you if anyone has already dug deep into this one!
function format_time_cols(sheetname, start_col, cols) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName(sheetname);
sheet.getRange(2,start_col,sheet.getLastRow(),cols).setNumberFormat('yyyy-mm-dd hh:mm:ss').setHorizontalAlignment('left');
}
The function accepts 3 parameters:
sheetname: the name of the sheet to operate on
start_col: the first column to apply the formatting to
ooh, I missed the “convert” bit.
But yes, I believe you’re right - the format of the date/time strings that Glide puts in the GSheet is misleading, as they have nothing to do with GMT. I think I read somewhere that they represent the time on the users device?