简体   繁体   中英

Excel Datedif with dates prior to 1900

How can I calculate the difference between two dates in Excel older than 1900? For example between 05/05/1862 and 04/16/1938. Thank you very much.

Excel stores dates as number of days since 1900, so one option might be to convert them to dates after 1900. For example, if A1 contains the text 05/05/1862 , then this formula results in 05/05/3862 :

= LEFT(A1, 6) & RIGHT(A1, 4) + 2000

and the difference in number of days between two text dates can be:

= (LEFT(A1, 6) & RIGHT(A1, 4) + 2000) - (LEFT(A2, 6) & RIGHT(A2, 4) + 2000)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM