I want to print the time on the serial monitor at the start and end of a signal (Help)

Can you show us your code that displays the "YYYY/MM/DD HH:MM:SS" on the serial monitor? That is the first step in fixing you program.
Paul