从两个日期时间计算秒 [英] Calculate seconds from two datetime

查看:117
本文介绍了从两个日期时间计算秒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想编写一个excel宏,它应该计算两个datetime的秒数。我在单个列中具有以下格式的datetime。 p>

  DateColumn 
----------------------- ---
2010-01-10-01.07.24.465000
2010-01-10-01.08.25.575000

如何使用宏计算上述日期时间的差异?

解决方案

你是寻找 Datediff()功能。



这里你有一些文档。您可以在第一个参数中选择秒数



无论如何,通过公式更好,更容易。


I want to write a excel macro, which should calculate the seconds from the two datetime.

I have the following format of datetime in a single column.

DateColumn
--------------------------
2010-01-10-01.07.24.465000
2010-01-10-01.08.25.575000

How to calculate the how many seconds difference in the above datetime using macro?

解决方案

You are looking for Datediff() Function.

Here you got some documentation. You can choose seconds in the first parameter

Anyways it is better and easier to do this by formula.

这篇关于从两个日期时间计算秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆