Well, in general, you will need to manage noticing the transition yourself. The "gross" way to do it as suggested above, get an initial date value, periodically get another date value and check to see if it changed. The frequency of how often you check or in what application loop you check will have an impact on your code's performance.
The other way is to create a thread that determines when the next occurrance of "midnight" happens and then trigger / signal and event / semaphore. Or, have that thread do the work that is necessary when the day changes.
In Windows, you'd compute "next midnight" something like this
int midnight_sleep;
SYSTEMTIME cur_time;
GetLocalTime(&cur_time);
midnight_sleep = ((23 - cur_time.wHour) * 60 * 60 * 1000) +
((59 - cur_time.wMinute) * 60 * 1000) +
((59 - cur_time.wSecond) * 1000) +
(1500 - cur_time.wMilliseconds);
Of course the above code doesn't get it exactly right if Daylight Savings Time happens (or stops happening) during the day or someone sets the system time.
In fact, if someone changes the system date, you wouldn't detect that immediately either.
So, if you care about "Exactly when the Date itself changes", you need to do the brute force method of frequently comparing the current date to a previously saved known date. And "Frequently" can be every minute or finer, depending on how much you care about it.