This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// backup service | |
function makeCopy() { | |
// generates the timestamp and stores in variable formattedDate as year-month-date hour-minute-second | |
var timeZone = Session.getScriptTimeZone(); | |
var formattedDate = Utilities.formatDate(new Date(), timeZone, "yyyy-MM-dd' 'HH:mm:ss"); | |
// gets the name of the original file and appends the word "copy" followed by the timestamp stored in formattedDate | |
var name = SpreadsheetApp.getActiveSpreadsheet().getName() + " Copy " + formattedDate; | |