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

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)

Tried: =TIMEVALUE(TRUNC(250/100)&":"&MOD(250,100)*0.6)
but it returned a decimal value.

Any other suggestions?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how do I convert an integer to hh:mm (part II)

Format it as time.

Format|cells|Number tab

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)

Tried: =TIMEVALUE(TRUNC(250/100)&":"&MOD(250,100)*0.6)
but it returned a decimal value.

Any other suggestions?


--

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 an integer to hh:mm in excel? kdell Excel Programming 4 July 11th 06 10:37 PM
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 03:02 AM.

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"