I have a spreadsheet with a form that timestamps every time the form is submitted. I'm writing a script to change the background color of the timestamped cell if it is more than seven minutes after a certain time.
Is there a way to compare time without comparing date in the API?
Should I convert the timestamp to another format (a string or something) to compare it?
I need to highlight the cell if it's after 6:07pm on any given day.
Best Answer
The following piece of code will set the background color of the entire row:
UPDATE
This code will set only the back ground color of the timestamp:
Add this script, via the script editor, to your spreadsheet and set the trigger:
![enter image description here](https://i.stack.imgur.com/b7Gsb.png)
Here's the form: Test For Web Applications and here's the sheet