Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default how do I convert an integer to hh:mm in excel?

Need to convert a simple integer (no decimals) to HH:MM format. The SQL
statement to convert this is as follows.... €śselect
datediff(mi,cast(cast(250/100 as int) as varchar) + ':' + cast(cast( 250 %
100 * .6 as int) as varchar)€ť

Trying to get the formula format correct in XCel. If you have any ideas that
would be great€¦

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default how do I convert an integer to hh:mm in excel?

=TIMEVALUE(TRUNC(250/100)&":"&MOD(250,100)*0.6)

--
Regards,
Tom Ogilvy


"kdell" wrote:

Need to convert a simple integer (no decimals) to HH:MM format. The SQL
statement to convert this is as follows.... €śselect
datediff(mi,cast(cast(250/100 as int) as varchar) + ':' + cast(cast( 250 %
100 * .6 as int) as varchar)€ť

Trying to get the formula format correct in XCel. If you have any ideas that
would be great€¦

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default how do I convert an integer to hh:mm in excel?

Tom,

Where do I put in the cell value (ex: A1) that I'm wishing to convert?

Thanks,
Kim

"Tom Ogilvy" wrote:

=TIMEVALUE(TRUNC(250/100)&":"&MOD(250,100)*0.6)

--
Regards,
Tom Ogilvy


"kdell" wrote:

Need to convert a simple integer (no decimals) to HH:MM format. The SQL
statement to convert this is as follows.... €śselect
datediff(mi,cast(cast(250/100 as int) as varchar) + ':' + cast(cast( 250 %
100 * .6 as int) as varchar)€ť

Trying to get the formula format correct in XCel. If you have any ideas that
would be great€¦

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default how do I convert an integer to hh:mm in excel?

Tom,

This gives a decimal number back... any other suggestions?

Kim


"kdell" wrote:

Tom,

Where do I put in the cell value (ex: A1) that I'm wishing to convert?

Thanks,
Kim

"Tom Ogilvy" wrote:

=TIMEVALUE(TRUNC(250/100)&":"&MOD(250,100)*0.6)

--
Regards,
Tom Ogilvy


"kdell" wrote:

Need to convert a simple integer (no decimals) to HH:MM format. The SQL
statement to convert this is as follows.... €śselect
datediff(mi,cast(cast(250/100 as int) as varchar) + ':' + cast(cast( 250 %
100 * .6 as int) as varchar)€ť

Trying to get the formula format correct in XCel. If you have any ideas that
would be great€¦

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how do I convert an integer to hh:mm in excel?

format it as time.

kdell wrote:

Tom,

This gives a decimal number back... any other suggestions?

Kim

"kdell" wrote:

Tom,

Where do I put in the cell value (ex: A1) that I'm wishing to convert?

Thanks,
Kim

"Tom Ogilvy" wrote:

=TIMEVALUE(TRUNC(250/100)&":"&MOD(250,100)*0.6)

--
Regards,
Tom Ogilvy


"kdell" wrote:

Need to convert a simple integer (no decimals) to HH:MM format. The SQL
statement to convert this is as follows.... €śselect
datediff(mi,cast(cast(250/100 as int) as varchar) + ':' + cast(cast( 250 %
100 * .6 as int) as varchar)€ť

Trying to get the formula format correct in XCel. If you have any ideas that
would be great€¦


--

Dave Peterson
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
Integer convert to minutes. Solidarity1 Excel Discussion (Misc queries) 5 October 9th 08 10:56 PM
Convert integer to time query Bryony Excel Discussion (Misc queries) 10 May 9th 08 05:22 PM
How do I convert char into integer in Excel VBA? RaY Excel Discussion (Misc queries) 2 July 21st 06 05:40 AM
Convert Text to Integer jerredjohnson Excel Discussion (Misc queries) 4 June 14th 06 07:45 PM
Convert time into integer Ali Excel Worksheet Functions 1 October 20th 05 02:52 PM


All times are GMT +1. The time now is 08:40 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"