BitConverter: ToDate

ToDate

Converts an array of bytes to a Date value.



 Public Function ToDate(
	  ByRef Bytes ( ) As Byte,
	  ByVal startIndex As Long ) As Date

Parameters

Bytes
[ByRef] Byte. The array of bytes to create a date from.
startIndex
[ByVal] Long. The starting byte in the array to create a date from.

Return Values

Date -  Date datatype representation of the 8 bytes used in the array.

Remarks

Even though a Date is represented using a Double, it may still raise an error due to the 8 bytes used represent an invalid date range.

See Also

Project VBCorLib Overview Class BitConverter Overview BitConverter Properties BitConverter Methods ToCurrency ToDecimal