Computing.Net > Forums > Programming > Outputing data

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Outputing data

Reply to Message Icon

Name: donever
Date: May 20, 2009 at 21:50:29 Pacific
OS: windows pro x64
CPU/Ram: athlon 4g
Product: Custom / CUSTOM BUILD
Subcategory: General
Comment:

Hello all! Ok I have this question that I can seem to figure it out so please help out. I'm writing my code in vb.net. The assignment is to have 3 textbox and each of the textbox accept hours, minutes, seconds. Based on the input, I'm suppose to display back the time. for example, user enter: 6 hours, 399 minutes, 253 seconds the output would be like this 12:43:13 . Everything seem right. The problem is that if minutes and seconds is 5, our teacher want us to output it like this 05 instead. How do you output like 05 instead of 5. thank you.



Sponsored Link
Ads by Google

Response Number 1
Name: shutat
Date: May 20, 2009 at 22:57:24 Pacific
Reply:

I don't know if VB.net has the format function or not, but you can give it a whirl and see.

MyStr = Format(MyTime, "hh:mm:ss AMPM")

______________________
My work in progress. I hate JS. :P


0

Response Number 2
Name: reno
Date: May 21, 2009 at 06:48:55 Pacific
Reply:

i=5
msgbox right("0"&i,2)


0

Response Number 3
Name: donever
Date: May 21, 2009 at 08:28:57 Pacific
Reply:

I figure it out. As for the format function, I'm not there yet. again thank!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Outputing data

Input-Output in C++ www.computing.net/answers/programming/inputoutput-in-c/6321.html

Outputting data to other source www.computing.net/answers/programming/outputting-data-to-other-source/12459.html

parallel output in VB www.computing.net/answers/programming/parallel-output-in-vb/6447.html