VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Single to String, impossible? Almar Joling (2 replies, 0 views) (2000-Sep-24) Hi,
I'm working on an Atomic clock server (NTP). The value is retrieved on the CLIENT by this. It's a 4char,32 bit value (single).
When a single is sent with the winsock control it changes in a string. How can I do this in code?
For example
½x¼A = 3178806337
And means the time 24-9-00 19:45:36
All my atomic clock messages are wrong, because of this part. Today I've been in 2005, 1987, etc...
NTPTime = Asc(Left$(tStr, 1)) * 256 ^ 3 + Asc(Mid$(tStr, 2, 1)) * 256 ^ 2 + Asc(Mid$(tStr, 3, 1)) * 256 ^ 1 + Asc(Right$(tStr, 1))
Anybody knows this??
Very much thanks in advance,
Almar Joling
|