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
Look at strptime()
strptime()
It converts an ASCII string formatted date/time into a struct tm
struct tm