I am writing a program to send SMS every 5 minutes. I want to stop this when the system time is 6 PM. How can I do that? This is my current code. I want to modify this accordin
You can use the below condition to check system TIME.
`if(DateTime.Now.Hour.ToString("HH") == "18") //Hour is in 24hour format`