简体   繁体   中英

Excel formula for calculating difference between two date columns

I have to 10k rows with two date columns. Can excel experts please provide an excel formula to calculate time difference(looking for diff in minutes) between below two date columns.

I have tried the formula =A1-B1 but its throwing #VALUE!

column A1 = 05/30/2019 21:16:48 +00:00

column B1 = 05/30/2019 21:10:28 +00:00

As mentioned in a comment by @Ron Rosenfeld , your times are just Strings and not true date/time values.

If you can't alter the original data (with a find/replace to eliminate all the +00:00 ), then a simple SUBSTITUTE and your original subtraction should work. Also, multiply by 1440 to convert the result to minutes: 60 minutes/hour * 24 hours/day = 1440 minutes/day.

=(SUBSTITUTE(A1," +00:00","")-SUBSTITUTE(B1," +00:00",""))*1440

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