Home » excel » Excel: convert from date to time range

Excel: convert from date to time range

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have a column of date in this format:

2019-04-17 16:26:17
2019-04-17 16:26:22
2019-04-17 16:26:27
2019-04-17 16:26:32
2019-04-17 16:26:37
2019-04-17 16:26:42
2019-04-17 16:26:47
2019-04-17 16:26:52
2019-04-17 16:26:57

If, for example, the first date is the time t = 0 how can I calculate the time span, in seconds, that elapses at the following dates/times? That data table was automatically generated in .xls file by software during the lab experience. This is an example of the result I would like to achieve

0
5
10
15
20
25
...
125

Can you help me?
Thank you in advance

How to&Answers:

If you have set your data appropriately this should work:

enter image description here

In cell B1 this formula:

=A1-$A$1

Assumptions:

  • Column A formatted: yyyy-mm-dd hh:mm:ss
  • Column B formatted: [s]

Drag down your formula…