How to take the server time in VB 6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Muiz
    New Member
    • Nov 2007
    • 6

    How to take the server time in VB 6

    Hi,

    Please help me i have to system time of the server (i.e. system time where SQL Server is available).
    please help me

    Thanks in advance.
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Open a Recordset with this query:

    Select GetDate()

    Regards
    Veena

    Comment

    • Muiz
      New Member
      • Nov 2007
      • 6

      #3
      Hi Veena,

      If the exe file runs in the client it will take client time right ?

      Muiz

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        With SQL Server, it returns, Server's Date..
        Open Recordset and populate it to some Local Variable..

        Regards
        Veena

        Comment

        • Muiz
          New Member
          • Nov 2007
          • 6

          #5
          Hi Veena,

          Its working..
          Thanks you very much....
          Have a nice day.

          Muiz

          Comment

          Working...