toDateTime - multiple declarations

Function toDateTime

Function to extract a DateTime from a ulong.

This is used to support the TimeStamp struct.

Prototype

std.datetime.DateTime toDateTime(
  ulong x
) pure;

Parameters

NameDescription
x A ulong e.g. 20111111122002UL.

Returns

A populated std.datetime.DateTime struct.

Function toDateTime

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

Text representations of a DateTime are as in 2011-11-11 12:20:02

Prototype

std.datetime.DateTime toDateTime(
  string s
);

Parameters

NameDescription
s A string representation of the time difference.

Returns

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

Function toDateTime

Function to extract a DateTime from a binary encoded row.

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.

Prototype

std.datetime.DateTime toDateTime(
  const(ubyte[]) a
) pure;

Parameters

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

Returns

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

Authors

Copyright

License