SocketTools .NET Edition

NetworkTime.ConvertTime Method (DateTime, Int64)

Convert a System.DateTime value to a network time value.

[Visual Basic]
Overloads Public Function ConvertTime( _
   ByRef dateTime As Date, _
   ByRef networkTime As Long _
) As Boolean
[C#]
public bool ConvertTime(
   ref DateTime dateTime,
   ref long networkTime
);

Parameters

dateTime
A System.DateTime structure passed by reference which will contain the date and time when the method returns.
networkTime
A long integer value which specifies the network time.

Return Value

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

Network time is expressed as the number of seconds that has elapsed since midnight, January 1, 1900 UTC.

See Also

NetworkTime Class | SocketTools Namespace | NetworkTime.ConvertTime Overload List