ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formating a timestamp as a date and time. (https://www.excelbanter.com/excel-worksheet-functions/139323-formating-timestamp-date-time.html)

dan

Formating a timestamp as a date and time.
 
I have imported some data into excell and it is currently looks like this
2006-09-26-11.16.38.902000 I am trying to compare ir get the difference
between two of these timestamps but excell doesn't receognize this format.
What is the easiest way to make this timestamp work? I am using excel 2000.


Bob Phillips

Formating a timestamp as a date and time.
 
Transform it

=DATE(LEFT(A1,4),MID(A1,6,2),MID(A1,9,2))+TIME(MID (A1,12,2),MID(A1,15,2),MID(A1,18,2))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Dan" wrote in message
...
I have imported some data into excell and it is currently looks like this
2006-09-26-11.16.38.902000 I am trying to compare ir get the difference
between two of these timestamps but excell doesn't receognize this format.
What is the easiest way to make this timestamp work? I am using excel
2000.




William Horton

Formating a timestamp as a date and time.
 
What does this represent?

I am guessing it is Sep 26th 2006 at 11:16:38. What does the .902000 refer
to?

If you import it as 2006-09-26 11:16:38 Excel recognizes it.
(put space between day and hour and put colon instead of period between
hour, minute and second.

Hope this helps.

"Dan" wrote:

I have imported some data into excell and it is currently looks like this
2006-09-26-11.16.38.902000 I am trying to compare ir get the difference
between two of these timestamps but excell doesn't receognize this format.
What is the easiest way to make this timestamp work? I am using excel 2000.


dan

Formating a timestamp as a date and time.
 
Bob thanks for this info, it worked great, and I was able to get the info I
needed.

"Bob Phillips" wrote:

Transform it

=DATE(LEFT(A1,4),MID(A1,6,2),MID(A1,9,2))+TIME(MID (A1,12,2),MID(A1,15,2),MID(A1,18,2))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Dan" wrote in message
...
I have imported some data into excell and it is currently looks like this
2006-09-26-11.16.38.902000 I am trying to compare ir get the difference
between two of these timestamps but excell doesn't receognize this format.
What is the easiest way to make this timestamp work? I am using excel
2000.






All times are GMT +1. The time now is 07:38 PM.

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