I have copied and pasted your code to put a time stamp on a spreadsheet that I am working on and it is working great. Except the day is coming back as "56" for some reason and I don't know why. It gives me this-02/56/16, 06:56:03 Also the time is way off from what my actual time is. Can you let me know what I need to change to get it to work properly? Below is the code that I am using.
function onEdit() { var s = SpreadsheetApp.getActiveSheet(); var r = s.getActiveCell(); if( r.getColumn() != 2 ) { //checks the column var row = r.getRow(); var time = new Date(); time = Utilities.formatDate(time, "GMT-08:00", "MM/DD/yy, hh:mm:ss"); SpreadsheetApp.getActiveSheet().getRange('B' + row.toString()).setValue(time); }; };