BinaryReader: ReadDate |
Reads eight bytes from the stream and returns them as a Date type.
Public Function ReadDate ( ) As Date
A Visual Basic Date type is represented as a Double type. However, this method reads in a 64 bit integer value as the Ticks of a CorDateTime type and converts it to Date.
If there is a need to read in a standard Date represeted as Double use the ReadDouble method.
Exception | Condition |
---|---|
EndOfStreamException | The end of the stream is reached. |
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
OverflowException | The sequence of eight bytes represented an invalid date. |