Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default convert decimal to time

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default convert decimal to time

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



"ganga" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default convert decimal to time

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.

--
Regards

Roger Govier


"Bob Phillips" wrote in message
...
=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)



"ganga" wrote in message
...
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





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default convert decimal to time

Thank you very match....

"Roger Govier" wrote:

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.

--
Regards

Roger Govier


"Bob Phillips" wrote in message
...
=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)



"ganga" wrote in message
...
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






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
convert time into decimal with max function Shariq Excel Discussion (Misc queries) 1 December 23rd 06 10:09 PM
convert time into decimal with max function Shariq Excel Discussion (Misc queries) 1 December 23rd 06 08:37 PM
How to convert time to decimal frankie New Users to Excel 1 May 24th 06 04:44 PM
How do I convert time (38:30) to decimal (38.5) format? Lori Excel Worksheet Functions 4 November 9th 05 05:00 AM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM


All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"