Answers for "google script get current date"

0

google script get current date

Utilities.formatDate(new Date(), "GMT+1", "dd/MM/yyyy")

function changeDate() {
    var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(GA_CONFIG);
    // You could use now Date(); on its own but it will not look nice.
    var date = Utilities.formatDate(new Date(), "GMT+1", "dd/MM/yyyy")
    var endDate = date
}

/*
You can change the format by doing swapping the values.

dd = day(31)
MM = Month(12) - Case sensitive
yyyy = Year(2017)
*/
Posted by: Guest on March-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language