http://www.boulder.nist.gov/timefreq/service/its.htm
"Jens" <til@infojens.dk> wrote in message
news:3bdc2bd4$0$25405$edfadb0f@dspool01.news.tele.dk...
> Før har jeg bruge denne kode til opgaven men serveren er lukket så hvad
gør
> jeg nu ???
>
>
>
> Dim RecTime As String
> Dim NTime As Date
> Const Port As Integer = 13
> Const sHost As String = "pogostick.net"
>
> Private Function FormatDateTime(NetTime As String) As Date
>
> Dim strDate As String
> Dim strTime As String
>
> strDate = Trim(Mid(NetTime, 4, 7)) & " " & _
> Trim(Mid(NetTime, 21))
>
> strTime = Trim(Mid(NetTime, 12, 9))
>
> If IsDate(strDate) And IsDate(strTime) Then
> FormatDateTime = CDate(strDate & " " & strTime)
> Else
> FormatDateTime = Now
> End If
>
> End Function
>
> Private Sub GetTime_Click()
> With WS
> .RemoteHost = sHost
> .RemotePort = Port
> .Connect
> End With
> End Sub
>
> Private Sub WS_DataArrival(ByVal bytesTotal As Long)
> If Not bytesTotal = 26 Then Exit Sub 'NPT server returnerer 26 bytes
> WS.GetData RecTime, vbString
> WS.Close
> RecTime = Left(RecTime, 24)
> NTime = FormatDateTime(RecTime)
> DateTime.Date = NTime
> DateTime.Time = NTime
> MsgBox "Dato og tid er sat!"
> End Sub
>
>