google script get current date

Solutions on MaxInterview for google script get current date by the best coders in the world

showing results for - "google script get current date"
Jessica
16 Mar 2016
1Utilities.formatDate(new Date(), "GMT+1", "dd/MM/yyyy")
2
3function changeDate() {
4    var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(GA_CONFIG);
5    // You could use now Date(); on its own but it will not look nice.
6    var date = Utilities.formatDate(new Date(), "GMT+1", "dd/MM/yyyy")
7    var endDate = date
8}
9
10/*
11You can change the format by doing swapping the values.
12
13dd = day(31)
14MM = Month(12) - Case sensitive
15yyyy = Year(2017)
16*/