Is there a Now time function that gets the Servers Now?

T

Trint Smith

Is there a Now time function that gets the Servers Now?
Instead of the Now from local computer?
Any help is appreciated.
Thanks,
Trint

.Net programmer
(e-mail address removed)
 
C

CJ Taylor

You can use SQL to synchronize your time... I have a VB6 method somehwere
that does it...

bascially, its just a query to the getdate() function.
 
C

CJ Taylor

I take that back...

Trint, your new to programming so this would be an excellent learning
project for you.

There are two distinct .NET ways you could do this. Remoting or Web
Services. Either case, you could set up a server side component (Remoting
Host or a Web Service) that would use the Now function to get the time on
that local machine (the server) and then transmit that to the requesting
client.

Simple app, but you'll get some insight into more .NET technology. Then you
can start asking questions like "what about lag?" and such if your looking
to make your timing calculation more precise =)

HTH,
CJ
 
C

CJ Taylor

I take that back...

Trint, your new to programming so this would be an excellent learning
project for you.

There are two distinct .NET ways you could do this. Remoting or Web
Services. Either case, you could set up a server side component (Remoting
Host or a Web Service) that would use the Now function to get the time on
that local machine (the server) and then transmit that to the requesting
client.

Simple app, but you'll get some insight into more .NET technology. Then you
can start asking questions like "what about lag?" and such if your looking
to make your timing calculation more precise =)

HTH,
CJ
 
C

Cor

Hi Trint,

If you do in ASP.NET
my.textbox.text = Now.tostring

You get the time from the server, to get the client time is more work.

Cor
 
C

CJ Taylor

Sorry about the double post.

CJ Taylor said:
I take that back...

Trint, your new to programming so this would be an excellent learning
project for you.

There are two distinct .NET ways you could do this. Remoting or Web
Services. Either case, you could set up a server side component (Remoting
Host or a Web Service) that would use the Now function to get the time on
that local machine (the server) and then transmit that to the requesting
client.

Simple app, but you'll get some insight into more .NET technology. Then you
can start asking questions like "what about lag?" and such if your looking
to make your timing calculation more precise =)

HTH,
CJ
 
C

CJ Taylor

Ahh... damnit... valid point Cor, I keep forgetting Trint is doing ASP.NET
work...

Well... my idea "would" have been cool. =)

-CJ
 
T

Trint Smith

I'm using Now now. But I thought it got the local computers time.
Thanks,
Trint

.Net programmer
(e-mail address removed)
 
R

Raterus

Sounds like Spaceballs around here ("I'm using Now Now")

...Some of the script I remember from the movie
"We're at Now Now"
"Go back to then"
"We Can't"
"Why"
"Because we just passed it"
"When will then be now"
"Soon"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top