Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > obtaining date/time values from a Time Server

Reply
Thread Tools

obtaining date/time values from a Time Server

 
 
=?Utf-8?B?UGF0cmljaw==?=
Guest
Posts: n/a
 
      01-29-2004
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?

 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      01-29-2004
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.

--
Scott
http://www.OdeToCode.com

On Thu, 29 Jan 2004 08:41:11 -0800, "Patrick"
<(E-Mail Removed)> wrote:

>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?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Obtaining specific .csv data (one data at a time) Kamarulnizam Rahim Ruby 5 02-02-2011 08:43 AM
obtaining multiple values from a function. Shriphani Python 5 09-25-2007 10:10 AM
Is time.time() < time.time() always true? flamesrock Python 8 11-24-2006 06:51 AM
obtaining the time offset from UTC __jakal__ C Programming 4 05-16-2005 04:35 AM
Obtaining Server Uptimes using Perl Aaron Perl 0 06-14-2004 03:25 PM



Advertisments