Posted on: 6/23/2012 8:19:29 PM | Views : 230

Hello ASP.NET community,
I am trying to generate an if statement to test if the time as it would be when the code is run is at an AM time or PM time and then return a string "Morning" or "Afternoon" depending on which it fell into.
So far I have:
TimeSpan now = DateTime.Now.TimeOfDay; //TimeSpan AM = DateTime //if (now.CompareTo()) //{ //} Which isn't much and I have been struggling to find anything on the web to help.  Can anyone give me any examples or tips?


...

Go to the complete details ...