obtaining date/time values from a Time Server

G

Guest

I can go to a command prompt and type:

net time \\<any server name here>

and this utility will display the time on that server. i have applications that need to use the date and time returned by the command above when creating records for our databases. How can I obtain the date/time value for a given server programmatically?
 
S

Scott Allen

Hi Patrick:

One way to use a command line program from .net is the Process class.
Look up the System.Diagnostics.Process class in help. This class will
allow you to start a process (with parameters) and read the standard
output stream.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top