Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Cape Town

    Unanswered: Retrieve Local time from remote SQL Server computer

    Hi all

    I am about updating some fields with local date and time using blw API
    Private Declare Sub GetLocalTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)

    Public Function LocalDateTime()

    Dim MyTime As SYSTEMTIME

    GetLocalTime MyTime

    Debug.Print "The Local Date is:" & MyTime.wMonth & "-" & MyTime.wDay & "-" & MyTime.wYear
    Debug.Print "The Local Time is:" & MyTime.wHour & ":" & MyTime.wMinute & ":" & MyTime.wSecond

    End Function
    This works fine however due to it's not really easy for an administrator to keep checking every times wheter local date and time are correctly updated for each front end users computer i would that to reconsider my function and making it to read local date and time from remote SQL Server. my concern is to help administrator to save time as he should only need to ensure that Server is running with correct time...

    thkx for any advise

  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    Umm... GETDATE()???

    Have you even looked in Books Online to see what date and time functions are available?
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

Posting Permissions

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