ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Time Data Conversion (https://www.excelbanter.com/excel-programming/447275-time-data-conversion.html)

[email protected]

Time Data Conversion
 
Hello.

My time data is presented like this:

093004000
093005000

Which is hh:mm:ss.millisec

I would like to convert the data so that when I add or subtract the 2 values I get the actual time difference in hh:mm:ss.

In the example above, if I did (093005000
- 093005000) the result would be 00:00:01.

Thanks in advance.

Claus Busch

Time Data Conversion
 
Hi,

Am Tue, 2 Oct 2012 09:36:29 -0700 (PDT) schrieb :

093004000
093005000

Which is hh:mm:ss.millisec

I would like to convert the data so that when I add or subtract the 2 values I get the actual time difference in hh:mm:ss.

In the example above, if I did (093005000
- 093005000) the result would be 00:00:01.


try:
=(A2-A1)/86400000
and format the cell hh:mm:ss


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

[email protected]

Time Data Conversion
 
On Tuesday, October 2, 2012 12:36:30 PM UTC-4, (unknown) wrote:
Hello. My time data is presented like this: 093004000 093005000 Which is hh:mm:ss.millisec I would like to convert the data so that when I add or subtract the 2 values I get the actual time difference in hh:mm:ss. In the example above, if I did (093005000 - 093005000) the result would be 00:00:01. Thanks in advance.


Thanks. I think that worked. I found that when I took my data from the database and pasted into excel the time formating changed on me.

If the data pastes into excel like this:

Time1 Time2 Diff
93003000 93010000 00:00:07
103040000 113040000 01:00:00

Is there a way to get the result in the 'Diff' column ?


Claus Busch

Time Data Conversion
 
Hi,

Am Tue, 2 Oct 2012 10:38:05 -0700 (PDT) schrieb :

Time1 Time2 Diff
93003000 93010000 00:00:07
103040000 113040000 01:00:00


try:
=(TEXT(B1/1000,"0\:00\:00"))-(TEXT(A1/1000,"0\:00\:00"))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


All times are GMT +1. The time now is 05:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com