mysql-native v3.0.0

API Reference Home: [This Version] [Latest Version] [Other Versions]


toDate - multiple declarations

Function toDate

Function to extract a Date from a binary encoded row.

std.datetime.date.Date toDate (
  const(ubyte[]) a
);

Time/date structures are packed by the server into a byte sub-packet with a leading length byte, and a minimal number of bytes to embody the data.

Parameters

NameDescription
a slice of a protocol packet beginning at the length byte for a chunk of Date data.

Returns

A populated or default initialized std.datetime.Date struct.

Function toDate

Function to extract a Date from a text encoded column value.

std.datetime.date.Date toDate (
  string s
);

Text representations of a Date are as in 2011-11-11

Parameters

NameDescription
s A string representation of the time difference.

Returns

A populated or default initialized std.datetime.Date struct.