473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How can i add time to my form, in VB language?

10
How can i add 'time' only (not date and time) to my form, in Visual basic Language.

i want to display current time at runtime, i have a label box called 'LabelTime' and i want the 'time' to be shown in this labelBox as it's text,

could you please advice?
Oct 29 '06 #1
4 2488
albertw
267 100+
How can i add 'time' only (not date and time) to my form, in Visual basic Language.

i want to display current time at runtime, i have a label box called 'LabelTime' and i want the 'time' to be shown in this labelBox as it's text,

could you please advice?
hi

suggest you put a timer on your form
set the timer-interval to 1000 (1 second) and enable it.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Timer1_Timer()
  2. LabelTime.Caption = Format(Time, "hh:mm:ss")
  3. End Sub
  4.  
Oct 29 '06 #2
Faez
10
Thank you!
Oct 29 '06 #3
is there a way to get that so it doesnt show up in millitary time.

instead of 18:45:30 like 6:45:30
Oct 30 '06 #4
Killer42
8,435 Expert 8TB
is there a way to get that so it doesnt show up in millitary time.

instead of 18:45:30 like 6:45:30
Look up the Format function in the online help - it explains how to set pretty much any format you want. If possible, use the Named Date/Time Formats (listed under See Also). That way it will pick up the user's Windows settings.

Incidentally, 24hr time is a good thing, once you get used to it. Removes a lot of ambiguity and confusion.
Oct 30 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much...
9
by: ME | last post by:
can someone tell me how to make this first one work??, located here: http://javascript.about.com/library/scripts/blshowdatetime.htm#examplesource This second one, well, dreamweaver eats the code,...
4
by: James Bond 007 | last post by:
I am a novice to Javascript (can do simple text-based pop-ups, but not familiar with variable manipulation). I would like to have a Javascript that gives me the start time (I don't care about...
3
by: Dan | last post by:
Question on how to do this. I'm trying to make a script that has 3 text fields in a form. When a start time is entered in a text field in the form the other 2 fields display the time with a set...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
11
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
7
by: webmaster | last post by:
I have a form that is using HTML and PHP to make calculations for an order form. One of the fields is asking for a total number of workstations. I would like this field to be a real-time total of...
6
by: D | last post by:
Hello all...I have an issue with one of my java script functions that I'm hoping someone can easily help with. I have a web based application that we use to create/sign up for overtime. When we...
9
by: Gregc. | last post by:
Hi Would anyone have an example of working out international time zones, using an array. Greg
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.