Convert them both to UNIX epoch time and subtract the difference.
UNIX Epoch time is the total number of seconds for a date since 1 January 1970 00:00:00.0
Once you've got the number of seconds, you divide that difference by the number of seconds in a day (which is 24 hours * 60 minutes * 60 seconds = 86400 seconds).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…