[英]Converting Date-Time (yyyy-mm-dd hh:mm:ss) format to seconds in EXCEL
I have a long list of "date-time" data which are formatted as (yyyy-mm-dd hh:mm:ss) and sorted in chronological order. 我有一长串的“日期时间”数据,其格式为(yyyy-mm-dd hh:mm:ss)并按时间顺序排序。 What I want to achieve is setting the first "date-time" as "0s" and set the succeeding "date-time" with reference to "0s".
我要实现的是将第一个“日期时间”设置为“ 0s”,然后将后续的“日期时间”设置为参考“ 0s”。 For example, if the first date is 2015-01-01 00:00:00 and nth date is 2015-01-02 00:00:00, then since exactly 24 hours=86400 seconds passed, I want the "date-time" to be converted to "0" for the first datum and "86400" for the nth datum.
例如,如果第一个日期是2015年1月1日00:00:00,第n个日期是2015年1月2日00:00:00,那么由于正好经过24小时= 86400秒,我希望“日期时间将第一个数据转换为“ 0”,将第n个数据转换为“ 86400”。 I don't want them to be renewed when the day passes.
我不希望在一天过去时更新它们。 I tried to achieve this by simply subtracting the 1st datum form the nth datum, but I confronted the problem of seconds getting renewed when the day pass.
我试图通过简单地从第n个基准减去第一个基准来实现这一点,但是我遇到了一天过去时秒数更新的问题。 I need some concrete hint about solving this problem or if there is simple function for achieving this, please let me know.
我需要一些有关解决此问题的具体提示,或者如果有实现此目的的简单功能,请告诉我。
我认为您可以简单地将此公式放入所需的单元格中:
=(A2-A1)*86400
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.