Time format problem

  • Thread starter Thread starter sandy
  • Start date Start date
S

sandy

the time like
9:00:00AM was displayed as 4292552277.375 in excel
12:00:00PM was displayed as 4292552277.5 in excel

Can any one help me how to display in normal format
9:00:00AM ?
 
-----Original Message-----
the time like
9:00:00AM was displayed as 4292552277.375 in excel
12:00:00PM was displayed as 4292552277.5 in excel

Can any one help me how to display in normal format
9:00:00AM ?
.

Did you try Format-Cells-Number-Time?

The programming language for this is (for the activecell):

ActiveCell.NumberFormat = "h:mm:ss AM/PM"
 
Hi Sandy
who did you get this numeric entry (by code or manual entry). As this
could never be the numeric representation of 09:00:00 (the value should
be below 1.0)
So also a format conversion won't help (as you stated in one of your
follow-ups)
 
thanks sandy, i found the reason!
9:00:00AM was displayed as 4292552277.375 in excel
actually only .375 is useful, 0.375 = 9:00:00AM !!!
i think the programmer added some time stamp before the
dot.
Thanks for reminding me time is less than 1.0
 
O.k.
so you might try to convert this column with
=INT(A1)
copy this down and format this column as 'Time'
 
Hi,

Sorry, I'm late in replying. If you read this, it might
be because Excel is not recognizing it as a valid number
for that time. For example, if you multiply today's date
by a negative number or a very large number like 100,
you'll get the same result as you have experienced.

I suppose you know that today's date could be a formula in
a cell like this: =today()
 
OK. I see you got it all figured out. I didn't read down
far enough, before I sent off the last reply.
 
Back
Top