简体   繁体   English

在Excel中计算UTC时差

[英]Calculate UTC time difference in Excel

Can any one provide an Excel equation that will compute the difference between two UTC timestamps. 谁能提供一个Excel方程来计算两个UTC时间戳之间的差。

The UTC time stamps have the format yyyymmddhhmmssZ (eg 20160127175049Z). UTC时间戳的格式为yyyymmddhhmmssZ(例如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: 要将时间戳更改为excel可以使用的日期/时间,请使用以下公式:

=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 然后将其格式化为[hh]:mm:ss

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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