View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
BenS BenS is offline
external usenet poster
 
Posts: 22
Default Convert Number to Time

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!