I checked the stackoverflow site for my answer, i did not get, so i am posting it here.
My problem is:
How to compare two time stamp in format
Here is a very easy way solution to solve your problem. If in your case the comparing depends on the time. If so, you can turn your time variables into string so you can compare them as a string. ONLY if the base of the comparison is the hour and minute and second elements and/or the day. It will look like this:
string time1 = "Mar 21 11:51:20";
string time2 = "Mar 21 10:20:05";
cout<time2)cout<