what is this "%04d%02d%02d%02d%02d%02d"?
You could look up the reference for sprintf()? It means 4 decimal digits with leading zero.
so I need to do some "string compare"
Try the function strcmp(). You should probably look up a C reference guide for string handling functions and get familiar with all the functions that are available. These are standard C functions that have existed for at least 30 years
and if for example in that time the cpu was doing something else
Like what? The cpu only does one thing at a time, so unless you are making it do soimething else it probably will not be.
make sense for you ?
If you are looking to match a date and time and are trying to get it to the last second, then this is probably not the right way to go about it. Think about the problem. How far ahead are you planning to schedule events - years or seconds? Then decide the time resolution that you need. For example if you are only looking to trigger on the time, then why bother looking at the year, month or date?