convert decimal to time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i want to know how to change the decimal to time format.

eg: when i enter the time as 9.30 i want that to be changed as 9:30 and
also when i enter the time as 1.38 to be changed as 13:38

Thnak you
 
=time(INT(A1),MOD(A1,1)*100,0)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi

In order to deal with the second part of your request, you would need to
modify Bob's formula with something like

=TIME(INT(A1)+12*(INT(A1)<8),MOD(A1,1)*100,0)

Any times which are less than 8, would have 12 hours added to make them
PM instead of AM.
Change the 8 to whatever value suits your purpose.
 
Thank you very match....

Roger Govier said:
Hi

In order to deal with the second part of your request, you would need to
modify Bob's formula with something like

=TIME(INT(A1)+12*(INT(A1)<8),MOD(A1,1)*100,0)

Any times which are less than 8, would have 12 hours added to make them
PM instead of AM.
Change the 8 to whatever value suits your purpose.
 
Back
Top