Search code examples
c++datetimesystemtime

30 days Difference on SYSTEMTIME


I am willing to ask if anyone has some good algorithm (or ways) to check if two SYSTEMTIME variable has a diff of 30 days or longer?

Thank you


Solution

  • I would convert them to FileTime and substract one from another.
    The difference should be more than 30*24*60*60*10^7.