Your browser does not seem to support CSS. If images appear below, please disregard them.
toggle
July
S M T W T F S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Sponsored Links
Latest Postings
· Blackbeard.....
by Gremelin on 07/04/16 08:31 PM
Topic Options
Rate This Topic
#17679 - 09/26/02 01:51 PM Time
Joined: Mar 2002
Posts: 9
Bluefire Offline
Junior Member
Bluefire Offline
Junior Member

Joined: Mar 2002
Posts: 9
Ontario,Canada
I am building a chat program and I would like to have the time. That the message was sent to appear with the message. Or have the current time appear in the top of the chat window. Any help would be great.


Beer, Helping ugly people get laid since 1862.
Top
Sponsored Links
#17680 - 09/26/02 06:19 PM Re: Time
Joined: Mar 2002
Posts: 197
Predator Offline
Member
Predator Offline
Member

Joined: Mar 2002
Posts: 197
Belgium
a little example of code, you'll understand it right away (very easy)

Code:
dim strTimeRightNow as string 'bleh not important for this one
strTimeRightNow = time 'the variable will contain the time for that moment, it's the same with date and who knows what other ones there are :)


Never argue with fools... They will only drag you down to their level, and beat you with experience...
Top
#17681 - 09/28/02 05:51 PM Re: Time
Joined: Mar 2002
Posts: 599
BackSlash Offline
UGN's Resident Homo
BackSlash Offline
UGN's Resident Homo

Joined: Mar 2002
Posts: 599
TN
when i want a clock i found it works well to put a timer on the page and set the interval at one second, then make the code for the interval as follows:

Code:
Text1.Text=DateTime.Time  
that makes the text1 display the current time every time the timer counts up one which is every second. thus you get a clock. also if you use DateTime.Date you can display the date. and these can also be used to change the computers date and time settings.


"It's better to burn out, than to fade away."
Top
#17682 - 09/29/02 08:25 PM Re: Time
Joined: Mar 2002
Posts: 1,273
SilentRage Offline
DollarDNS Owner
SilentRage Offline
DollarDNS Owner

Joined: Mar 2002
Posts: 1,273
OH, USA
That's actually the same thing. I didn't know about the DateTime object before, but it turns out that specifying 'DateTime' isn't necessary.

Text1.Text = DateTime.Time

is just like saying

Text1.Text = Time

However, typing DateTime out is useful in that it shows you all the different methods and properties it supports.


Domain Registration, Hosting, Management
http://www.dollardns.net
Top
#17683 - 09/30/02 12:34 AM Re: Time
Joined: Mar 2002
Posts: 599
BackSlash Offline
UGN's Resident Homo
BackSlash Offline
UGN's Resident Homo

Joined: Mar 2002
Posts: 599
TN
humm, i didn't know that, saves me some typing next time. thanks


"It's better to burn out, than to fade away."
Top
#17684 - 09/30/02 12:39 AM Re: Time
Joined: Mar 2002
Posts: 599
BackSlash Offline
UGN's Resident Homo
BackSlash Offline
UGN's Resident Homo

Joined: Mar 2002
Posts: 599
TN
also, i shouldn't say this without trying it first to make sure i got it right, but i think you can do format(date, "dd mm yy") or something like that, and there is probably one like that for time as well. ask neo, i think he knows it...


"It's better to burn out, than to fade away."
Top
#17685 - 09/30/02 02:57 AM Re: Time
Joined: Mar 2002
Posts: 1,273
SilentRage Offline
DollarDNS Owner
SilentRage Offline
DollarDNS Owner

Joined: Mar 2002
Posts: 1,273
OH, USA
yeah, that one is well used by me. Look up the Format Function. It can do all kinds of things.

Format(Time, "hh:mm:ss AM/PM")
Format(Date, "mm-dd-yyyy")
Format(12.4212, "Currency")


Domain Registration, Hosting, Management
http://www.dollardns.net
Top

Member Spotlight
Crime

Crime
SC, usa
Posts: 506
Joined: March 2002
Show All Member Profiles 
Forum Statistics
Forums46
Topics46,185
Posts81,355
Members2,157
Most Online1,567
Apr 25th, 2010
Top Posters(All Time)
UGN Security 39,349
Gremelin 7,195
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Newest Members
Herbert_Sherbert, codemauve, Lillysdragon1984, Brewwit, boa
2157 Registered Users
Who's Online Now
0 registered members (), 0 guests and 1 spider.
Latest News