简体   繁体   中英

Calculate UTC time difference in Excel

Can any one provide an Excel equation that will compute the difference between two UTC timestamps.

The UTC time stamps have the format yyyymmddhhmmssZ (eg 20160127175049Z). The difference between time stamps is at most few hours so, I will like the answer to be in minutes or hours.

Appreciate any guidance. Thanks

To change the time stamps into a date/time that excel can use, use this formula:

=DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2)) + TIME(MID(A1,9,2),MID(A1,11,2),MID(A1,13,2))

Then format it with a custom format of your desire.

在此处输入图片说明

Then it is just a matter of subtracting one from the other.

Then formatting it like [hh]:mm:ss

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