Your browser does not seem to support CSS. If images appear below, please disregard them.
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.
Previous Thread
Next Thread
Print Thread
Rate This Thread
#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.
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...
#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."
#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
#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."
Sponsored Links
#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."
#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

Member Spotlight
Gremelin
Gremelin
Portland, OR; USA
Posts: 7,195
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums45
Topics47,513
Posts82,683
Average Daily Posts8
Members2,159
Most Online1,567
Apr 25th, 2010
Latest Postings
Top Posters(All Time)
UGN Security 40,677
Gremelin 7,195
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Liked Users (All Time)
§intå× Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
Ghost Likes: 1
Gremelin Likes: 4
Ice Likes: 1
unreal Likes: 1
Top Liked Users (30 Days)
No Data Found
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20160902)