Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Time format problem

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 ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Time format problem


-----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"
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Time format problem

TRIED. But the following appears:
############################

so strange...
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Time format problem

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)

--
Regards
Frank Kabel
Frankfurt, Germany

sandy wrote:
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 ?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Time format problem

The excel file was generated by crystal report from my
company's system.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Time format problem

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
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Time format problem

O.k.
so you might try to convert this column with
=INT(A1)
copy this down and format this column as 'Time'

--
Regards
Frank Kabel
Frankfurt, Germany

sandy wrote:
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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Time format problem

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()

-----Original Message-----
TRIED. But the following appears:
############################

so strange...
.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Time format problem

OK. I see you got it all figured out. I didn't read down
far enough, before I sent off the last reply.

-----Original Message-----
TRIED. But the following appears:
############################

so strange...
.

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
Time Format Problem John Calder New Users to Excel 3 August 19th 09 01:49 AM
format time problem Pyrite Excel Discussion (Misc queries) 5 September 8th 08 06:48 PM
time format problem P Boric Excel Worksheet Functions 2 August 27th 07 08:49 AM
Time format problem chrisbarber1 Excel Discussion (Misc queries) 8 August 5th 06 03:54 PM
A Time Format Problem PA New Users to Excel 5 May 24th 06 06:25 AM


All times are GMT +1. The time now is 03:08 PM.

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"