My goal is for an end-user to paste the timestamp from the form into a dialoge box, and it will get the results of the response that has that particular timestamp. The script I am working on is bound to the form.
I can get a result from a timestamp, however in building the function, I found out that the response.getTimestamp(), will produce a different result than the timestamp in the form.
I am wonding if anyone has an idea for a workaround, where someone can just paste the timestamp from the sheet and thet the corresponding result in the form script.
Here is my code which I thought should work, but doesn't
function getCorrectTimestamp(t){
t = "12/11/2015 10:28:50";
// t = "Fri Dec 11 2015 10:28:49 GMT-0500 (EST)";
// t = "Fri Dec 11 2015 10:29:28 GMT-0500 (EST)";
// t = "Fri Dec 11 2015 10:29:12 GMT-0500 (EST)";
var n = 0;
var td = new Date(t);
var form = FormApp.getActiveForm();
var r = form.getResponses(td);
var rt = r[n].getTimestamp();
var name = r[n].getItemResponses()[0].getResponse();
Logger.log(t);
}