Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Stewart Chew
  Where is Stewart Chew?
 
 Malaysia
 Stewart Chew
 Tags
Subject: RE: hours conversion
Thread ID: 143367 Message ID: 143393 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Tuesday, August 28, 2007 2:20:09 PM         
   


> Dear Expert,
>
> Can anyone here help me to solve this problem? I want to do conversation from numeric to hours.
> For example :-
>
> Field :
> tm_set N(6,2)
>
> tm_set
> 125.00
> 55.00
> 120.00
>
> How m i convert the above value to hh:mm by using SELECT OR UPDATE command?
> 125.00 = 02:05
> 55.00 = 00:55
> 120.00 = 02:00
>
> Regards,
>
> Stewart Chew

If your minutes are within 0-1439 range (not spanning days) then another expression might be:

SELECT minutes, ;
  TRANSFORM(SUBSTR(TTOC(CTOT('0')+minutes*60,1),9,4),'@R 99:99') as hours ;
  FROM myTable


Cetin Basoz

ENTIRE THREAD

hours conversion Posted by Stewart Chew @ 8/28/2007 10:48:18 AM
RE: hours conversion Posted by tushar @ 8/28/2007 11:03:08 AM
RE: hours conversion Posted by Borislav Borissov @ 8/28/2007 11:07:44 AM
RE: hours conversion Posted by Stewart Chew @ 8/28/2007 12:01:35 PM
RE: hours conversion Posted by Borislav Borissov @ 8/28/2007 12:08:51 PM
RE: hours conversion Posted by Cetin Basoz @ 8/28/2007 2:20:09 PM
RE: hours conversion Posted by Boudewijn Lutgerink @ 8/31/2007 11:28:53 AM