want to add script editor in Google sheets

i want to compare 2 cells i.e a2 and b2, in these two cells, there is a time stamp,i want to compare if b2 is greater tha a2 i want the colour of c2 automatically changed from green to red.i want to do this woth the help of script editor