Results 1 to 8 of 8

Thread: Get Server Date & Time from Client Machine

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    135

    Get Server Date & Time from Client Machine

    Hello,

    I am developing a multiuser application where in the s/w would be running on various machines.

    Is there any way by which I can get the Servers Date and time from the Client machine. I would be knowing the Server Name in the program.

    Is this possible?
    What controls I need to use for this?

    Pls help...


    Regards.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Get Server Date & Time from Client Machine

    What language is your front end developed in?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    135

    Smile Re: Get Server Date & Time from Client Machine

    My Front end is developed in VB6 and back end is in Access.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Get Server Date & Time from Client Machine

    But, you want the date/time of the network file server right, not your Access database.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    135

    Re: Get Server Date & Time from Client Machine

    I want System Date and Time of the Server and not of the access file.

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Get Server Date & Time from Client Machine

    If we can assume these systems are all in the same Workgroup or Domain there is a fairly simple way to get the information by calling NetRemoteTOD() of the netapi32.dll library.

    I dug up an old example/demo and have attached it.


    Edit:

    I should add that this probably won't work at all for asking a Win9x machine it's current time and date. Also if you call NetRemoteTOD() on an NT 4.0 (or earlier) system the server name must be in UNC form, i.e. preceded by two \ characters:

    \\BigServer

    On newer systems (Win2K and later) you can use either a DNS name or a NetBIOS name, and you do not need the leading "\\" symbols.

    http://msdn2.microsoft.com/en-us/library/aa370612.aspx
    Attached Files Attached Files
    Last edited by dilettante; May 8th, 2007 at 04:27 PM.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    135

    Re: Get Server Date & Time from Client Machine

    Thanks dilettante for your support.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    135

    Re: Get Server Date & Time from Client Machine

    Thanks dilettante for your support. i will check it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width