obtaining date/time values from a Time Server

Discussion in 'ASP .Net' started by =?Utf-8?B?UGF0cmljaw==?=, Jan 29, 2004.

  1. 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?
    =?Utf-8?B?UGF0cmljaw==?=, Jan 29, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?UGF0cmljaw==?=

    Scott Allen Guest

    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"
    <> 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?
    Scott Allen, Jan 29, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Berg
    Replies:
    0
    Views:
    783
    Chris Berg
    Oct 27, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,242
    Michael Borgwardt
    May 30, 2004
  3. Keith Cochrane
    Replies:
    2
    Views:
    608
    Keith Cochrane
    Aug 6, 2006
  4. Shriphani
    Replies:
    5
    Views:
    268
    Paul Rudin
    Sep 25, 2007
  5. dch3
    Replies:
    2
    Views:
    515
Loading...

Share This Page