Answered by:
Need some help with some coding...

Question
-
I have to creat a progran that ask the user to enter the amount of hours work for 5 diferent projects in textboxes. The user have to enter the time he worked in minutes. Ex: 153, 280, 600, 130, 20... The total then is out putted into a textbox in this format "13 Hours and 35 Minutes" I'm having dificulties making the conversion and the separation from hours and minutes. I understand that the total is divided by 60, but if we fallow the above numbers the total hours comes out to 1183 / 60 = 19.71. So I'm having problems with the .71 mnts or digits... so from this total I have to output the total of in this particular format: "19 Hours and ? Minutes" so can anyone give me hint please, please!!!Tuesday, September 22, 2009 5:44 AM
Answers
-
is this a class project?
to start, in VS2008 click on the Help menu. Then click on Search
in the Search box on that page, type in Mod Operator Visual Basic
on that page, it will show you how to get the hrs part, and it will also tell you how to get the remaining minutes
try to solve it using what you find on that page (the answer is there) :)- Proposed as answer by Prasanta Swain Tuesday, September 22, 2009 6:07 AM
- Marked as answer by Jeff Shan Thursday, September 24, 2009 7:31 AM
Tuesday, September 22, 2009 5:46 AM -
Dim TS As TimeSpan = TimeSpan.FromMinutes(150) MessageBox.Show(TS.Hours & " Hours " & TS.Minutes & " Minutes")
coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
Please format the code in your posts with thebutton . Makes it easier to read .
- Proposed as answer by Cor Ligthert Tuesday, September 22, 2009 8:29 AM
- Marked as answer by Jeff Shan Thursday, September 24, 2009 7:31 AM
Tuesday, September 22, 2009 8:19 AM
All replies
-
is this a class project?
to start, in VS2008 click on the Help menu. Then click on Search
in the Search box on that page, type in Mod Operator Visual Basic
on that page, it will show you how to get the hrs part, and it will also tell you how to get the remaining minutes
try to solve it using what you find on that page (the answer is there) :)- Proposed as answer by Prasanta Swain Tuesday, September 22, 2009 6:07 AM
- Marked as answer by Jeff Shan Thursday, September 24, 2009 7:31 AM
Tuesday, September 22, 2009 5:46 AM -
Dim TS As TimeSpan = TimeSpan.FromMinutes(150) MessageBox.Show(TS.Hours & " Hours " & TS.Minutes & " Minutes")
coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
Please format the code in your posts with thebutton . Makes it easier to read .
- Proposed as answer by Cor Ligthert Tuesday, September 22, 2009 8:29 AM
- Marked as answer by Jeff Shan Thursday, September 24, 2009 7:31 AM
Tuesday, September 22, 2009 8:19 AM