Do IF statements work using timestamps? I'm using a Google Sheet from a Google Form and would like to use the Timestamp as a matching identifier.
Code:
if (time == homeTime) {
s.getRange(7, 1).setValue("Yay!");
Logger.log shows both variables are indeed the same value (Tue Jun 26 08:47:52 GMT-04:00 2018
).
It works if I choose a value other than the timestamp, such as an email address.
I cannot use < or > because I'm using this in a for loop. As a temporary fix, I changed the format of the column to Plain Text using @, but time - homeTime == 0 is the answer I needed!
I'm trying to figure out how to mark my answer correctly so I apologize if I mess it up.