Re:The Microsoft Excel superstars throw down in Vegas
by unsupp0rted on Friday June 14, 2024 @03:10PM
(#40683958)
This is what I'm saying. It takes a dozen LoC to do what Excel is theoretically built to do: format a column of dates "as date".
function dateFix() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1"); var dateRange = sheet.getRange("A:A"); var dateValues = dateRange.getValues();
}function fixDate(dateString) { var datePattern = /^(\d{1,2})\/(\d{1,2})\/(\d{2}|\d{4})$/; var match = dateString.match(datePattern);