Results 1 to 9 of 9

Thread: Win95/2k Get NT Time/Date?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318
    Do anybody can help me by telling me how to :

    Get NT Server Date/Time from a Win95/98/2k?

    Besides, do anybody have experience in doing the same thing, from Unix instead of NT?

    Thanks

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    you can just use the now function or the date function

    msgbox now
    msgbox date
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

  3. #3
    Guest
    A vb prog cannot even be run in UNIX, so please forget that.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318

    Question

    I am talking about reading the NT Server Date/Time from a VB program running under Win95/Win98/Win2000. Not the LOCAL PC DATE/TIME.

    For reading Unix date/time, I am looking for anyway to use TCP/IP to communicate with Unix and see whether there is any standard port (like port 7 for echo, etc) that can provide date/time information.


  5. #5
    Guest
    The normal "Now" should work on any win version.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318

    Unhappy

    Sorry, Escaflowne

    I think you still not understand what I am looking for.

    I AM NOT RUNNING THE VB PROGRAM IN NT,
    what I mean is there are 2 machines, one is NT server (A), the other is any machine B (Win95/98/2k)

    What I need is run the program in machine B but read the date and time of machine A.

    I hope this can make it clear.


  7. #7
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    finally !!!

    O.k, this is easy !

    All you need to do is having an ASP on the server showing just the time on that machine (machine B - the server).

    What you do is access the page and parse it to get the time.

    you need to add the internet transfer control to your form and use it to get the content of the ASP page (which would only be the time)

    example:

    Dim strTime
    strTime = Inet1.OpenURL("http://serverIP/timepage.asp")
    MsgBox strTime

    if you have any questions, just say so ...
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318
    Thank you asabi,

    this seems to be a workable solution, except, I worry about the performance.

    Since I need to resynchonise the date/time for every transaction.


  9. #9
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    if the server has a good connection, then it won't be a problem...

    it is less then a mil sec ... the whole page will just have the time (about 8 characters ..). it is probably less then 1 kb to load ..



    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

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