Convert general number to time-of-day format


Posted by Ron S. on July 22, 2001 3:07 PM

Recently copied info from a web site containing time-of-the-day info that I now want to use in calculations. Problem is that the time info is in a general number format: e.g., "5:43AM" is simply "543", 6:05PM is simply "1805". I can't find a way to convert the general numbers into a date format without manually changing every cell. (There are hundreds of cells.) Is there a simpler way to accomplish this task?

Appreciate your help in advance.

Ron S.

Posted by Aladin Akyurek on July 22, 2001 3:56 PM

One way to do it is with a formula. Assuming that the time info in general number format is in A,

in B1 enter: =(LEFT(A1,LEN(A1)-2)&":"&RIGHT(A1,2))+0

Time format cell A1 then copy down the formula as far as needed. Select now the time info in B, copy the selection, and do a Paste Special|Values.

Aladin

==========

Posted by Ron S. on July 22, 2001 11:25 PM

Alladin- Thanks for the fix

Yep- That worked great. Thanks Aladin

Ron S.



Posted by Ron S. on July 22, 2001 11:25 PM

Alladin- Thanks for the fix

Yep- That worked great. Thanks Aladin

Ron S.