Results 1 to 4 of 4

Thread: get system time from server

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Posts
    211

    get system time from server

    hi

    I'm using vb6 and mysql(xampp) as my back end. My application will be install in each pc and the database will be on our server windows 2003.Is it possible that the time and date of my application will be based on the server?if yes how?

    Thanks!

  2. #2
    Frenzied Member
    Join Date
    Mar 2009
    Posts
    1,182

    Re: get system time from server

    Yes, I think it would be something like Select @GETDATE AS THEDATE or you could the API NetRemoteTOD see http://vbnet.mvps.org/index.html?cod...tremotetod.htm



    Good Luck
    Option Explicit should not be an Option!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Posts
    211

    Re: get system time from server

    thanks!

    I forgot to mention that i'll be using a timer and the time on the timer will be based on the server.I'm doing Attendance system:time in and out of employees.and they want to sync the time to the server.

  4. #4
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: get system time from server

    This SQL query should work:
    Code:
    SELECT NOW()
    If you already have the Conection to MySQL, then declare a Recordset and do something like..
    Code:
       Set Rs = CN.Execute("SELECT NOW()")

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