ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Unwanted formatting of time data (https://www.excelbanter.com/excel-discussion-misc-queries/182217-unwanted-formatting-time-data.html)

Lucas

Unwanted formatting of time data
 
Hello. I have imported some data into Excel. One of the columns represents
time and looks like this: "2008-02-14 15:40:07,734". I do a find-replace to
replace all ',' in this field with '.'. Whenever I do this, however, Excel
converts all of the data in this field to some sort of time representation.
This is not what I want. I just want the original text as it was.

I have tried setting the field to General and Text formats, and Excel still
does the strange time formatting after Find/Replace. After the conversion,
I've tried setting the field to Text, and I just get some silly time
representation that looks like this: "39492.6528672917"

Does anyone know how to turn off this autoformatting? I've looked all over
hte options and can't find anything.

Thanks,
Lucas

David Biddulph[_2_]

Unwanted formatting of time data
 
=TEXT(A2,"yyyy-mm-dd hh:mm:ss.000") will convert your time to text.

Another option is to use =SUBSTITUTE(A1,",",".") on your original cell
(instead of doing Edit/ Replace), and that will leave the result as text.
--
David Biddulph

"Lucas" wrote in message
...
Hello. I have imported some data into Excel. One of the columns
represents
time and looks like this: "2008-02-14 15:40:07,734". I do a find-replace
to
replace all ',' in this field with '.'. Whenever I do this, however,
Excel
converts all of the data in this field to some sort of time
representation.
This is not what I want. I just want the original text as it was.

I have tried setting the field to General and Text formats, and Excel
still
does the strange time formatting after Find/Replace. After the
conversion,
I've tried setting the field to Text, and I just get some silly time
representation that looks like this: "39492.6528672917"

Does anyone know how to turn off this autoformatting? I've looked all over
hte options and can't find anything.

Thanks,
Lucas




Lucas

Unwanted formatting of time data
 
Thanks, David! That worked fine.


All times are GMT +1. The time now is 09:59 AM.

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