[ad_1]
Using Power automate to run a script which works fine but I need to run it in UTC time and date format (Singapore)
using a script I found here
function main(workbook: ExcelScript.Workbook) {
let worksheet = workbook.getWorksheet("Sheet1");
// Get the cells at A1 and B1.
let dateRange = worksheet.getRange("P17");
let timeRange = worksheet.getRange("Q17");
let date = new Date(Date.now() + (3600 * 1000 * 0));
dateRange.setValue(date.toLocaleDateString());
timeRange.setValue(date.toLocaleTimeString());
}
I need to change it away from local time as that is in American format plus 3 hours Perth Vs Sydney
thank you
[ad_2]