Skip to main content

encode_date

Function encode_date 

Source
pub fn encode_date(date: NaiveDate, buf: &mut BytesMut) -> Result<(), TypeError>
Expand description

Encode a DATE value.

TDS DATE is the number of days since 0001-01-01.

§Errors

Returns an error if the date is outside SQL Server’s DATE range (0001-01-01 through 9999-12-31). chrono permits dates beyond both ends, which previously wrapped silently into garbage wire values.