Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Robert Smith
 
Posts: n/a
Default Text to time conversion

I have a text file that I want to import into excel. I have a column that is
a time field. (Ex. 142200)(hh:mm:ss). When I import it and format it in time,
I always get 00:00:00. Is there a command that I need to convert it.
Robert
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Robert,

Try

=A2/24/60/60

and format as time


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Robert Smith" wrote in message
...
I have a text file that I want to import into excel. I have a column that

is
a time field. (Ex. 142200)(hh:mm:ss). When I import it and format it in

time,
I always get 00:00:00. Is there a command that I need to convert it.
Robert



  #3   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Robert,

I don't think there's any way these numbers will be interpreted as hh:mm:ss
with either opening or importing a text file. 142200, since there's no
fractional part (right of the decimal point -- the part that indicates a
fraction of a day, or time) will always be zero. This value is a date of 29
Apr 2289, at midnight.

I think you'll have to open or import them as text (so you don't lose
leading zeroes, e.g.: 042200 for 04:22:00), then use another column to
convert them:

=TIME(LEFT(A2,2),MID(A2,3,2), RIGHT(A2,2))

Then this column would be formatted for hh:mm:ss, or however you want to see
it.
--
Earl Kiosterud
www.smokeylake.com

"Robert Smith" wrote in message
...
I have a text file that I want to import into excel. I have a column that
is
a time field. (Ex. 142200)(hh:mm:ss). When I import it and format it in
time,
I always get 00:00:00. Is there a command that I need to convert it.
Robert



  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Another formula that will convert it:

=--TEXT(A1,"00\:00\:00")

Still format as time.

Robert Smith wrote:

I have a text file that I want to import into excel. I have a column that is
a time field. (Ex. 142200)(hh:mm:ss). When I import it and format it in time,
I always get 00:00:00. Is there a command that I need to convert it.
Robert


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculating time with text [email protected] Excel Worksheet Functions 4 July 29th 05 04:22 AM
Text Wrapping JMB Excel Discussion (Misc queries) 0 July 29th 05 02:41 AM
Conversion of a Number into English Text Nasir Ali Excel Worksheet Functions 1 July 28th 05 08:50 AM
Changing Text to Time in Excel Chip193 Excel Discussion (Misc queries) 1 July 27th 05 05:53 PM
Autofitting a row Josephine Excel Discussion (Misc queries) 2 March 3rd 05 03:37 PM


All times are GMT +1. The time now is 04:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"