Tuesday 15 May 2012

google spreadsheet - Timestamp Date & Time Format - Apps Script - Format Date and Time -


I can not get the time-stamp format in the spreadsheet cell to include the time. Currently, it only produces the date What does I need to change to get a time-ticket to show both date and time?

Like this:

3/17/2015 10:57:45

Edit on the function {var ss = event.source . GetActiveSheet (); Var r = event.source.getActiveRange (); If (r.getColumn () == 8) {// To check that the update cell, 1 means the first column in the column. If (r.getValue () == "resolved") {// value to check the value is equal to Szetrange ('L' + R. Gaterev ()). Set value (new date); // Set the column B1 value in the current date Date = Utilities.Format (Time, "GMT", "HH: mm: SS"); } Else {ss.getRange ('L' + r.getRow ()). SetValue (''); }}

You need to use:

 < Code> Var formatteddet = utilities.format (time, "GMT", "mm-dd-yyah hh: mm: ss");  

There is an example in the documentation:


No comments:

Post a Comment