UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
Sponsored Links
Latest Postings
The History Thread...
by Gremelin
09/18/14 12:42 PM
Doom 3
by Cyrez
09/11/14 11:58 PM
Latest Reviews
Topic Options
Rate This Topic
#17679 - 09/26/02 09:51 AM Time
Bluefire Offline
Junior Member

Registered: 03/19/02
Posts: 9
Loc: 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 02:19 PM Re: Time
Predator Offline
Member

Registered: 03/01/02
Posts: 197
Loc: 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 01:51 PM Re: Time
BackSlash Offline
UGN's Resident Homo

Registered: 03/16/02
Posts: 599
Loc: 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 04:25 PM Re: Time
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: 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/29/02 08:34 PM Re: Time
BackSlash Offline
UGN's Resident Homo

Registered: 03/16/02
Posts: 599
Loc: 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/29/02 08:39 PM Re: Time
BackSlash Offline
UGN's Resident Homo

Registered: 03/16/02
Posts: 599
Loc: 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/29/02 10:57 PM Re: Time
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: 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

Featured Member
Registered: 03/02/02
Posts: 136
Forum Stats
2148 Members
46 Forums
34728 Topics
69898 Posts

Max Online: 1567 @ 04/25/10 05:20 AM
Top Posters
UGN Security 27890
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Tim050, Gecko666, defghi795767, Devo60, ali
2148 Registered Users
Who's Online
0 registered (), 356 Guests and 255 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!