View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Convert Number to Time

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"BenS" wrote in message
...
The solution you proposed worked perfectly! Thank you so much for your
help
on this, it will really save me a good amount of time.

Thanks!

"T. Valko" wrote:

One way:

Assume number values are in A1 on down.

Enter this formula in B1 and copy down as needed:

=TIME(MID(A1*0.000001,3,2),MID(A1*0.000001,5,2),MI D(A1*0.000001,7,2))

Then format in the TIME style of your choice. I guess the first selection
listed would be your best choice.

--
Biff
Microsoft Excel MVP


"BenS" wrote in message
...
I am struggling with some data I exported from an Oracle Aspect DB into
Excel. One column is a list of times in the format: HHMMSS but if
there
is
no value for hours or minutes, there will be no leading zeros. This
means
the value can have anywhere from 1 to 6 digits.

For example, here are some sample times in this column:
ORIG_TIME
1
46
121
404
3008
12342
175632

These would translate into the following times:
12:00:01 AM
12:00:46 AM
12:01:21 AM
12:04:04 AM
12:30:08 AM
01:23:42 AM
05:56:32 PM

I would like a formula/method for converting these numbers into time
values
as recognized by Excel. I would be fine with the times in AM/PM or 24
Hour
time. Any assistance would be greatly appreciated.

Thanks!