Results 1 to 5 of 5

Thread: Server clock

  1. #1
    Join Date
    Mar 2004
    Posts
    34

    Question Unanswered: Server clock

    Hello folks,

    I am working on a program on this system where a few computer connect to a MS SQL server and record certain events.

    Thing is, I need to log the events with a time stamp so I'll need to find the server clock somehow and access time is vital.

    How do I do that?

    I program in VB6.

    Thanks
    Chen

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    In SQL Server, use the GetDate() function.

    -PatP

  3. #3
    Join Date
    Mar 2004
    Posts
    34
    Yes,
    But how do I use it?

    I can't just do a -

    dim a as string

    a=select getdate()

    or whatever..

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Just SELECT it (using ADO) like you would any other date.

    -PatP

  5. #5
    Join Date
    Mar 2004
    Posts
    34
    Let's say I usually select things into a recordset.

    How would I call that field in the recordset results?

Posting Permissions

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