[#BloombergLP-bdlt-Datetime-2constructor-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Datetime.adoc[Datetime]::Datetime
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdlt&lowbar;datetime&period;h&gt;`

Create a `Datetime` object whose &quot;date&quot; and &quot;time&quot; parts have their respective default&hyphen;constructed values, &quot;0001&sol;01&sol;01&quot; and &quot;24&colon;00&colon;00&period;000000&quot;&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlt/Datetime/2constructor-0c9.adoc[Datetime]();
----

[.small]#xref:BloombergLP/bdlt/Datetime/2constructor-0c9.adoc[_» more&period;&period;&period;_]#

Create a `Datetime` object having the value of the specified `original` object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlt/Datetime/2constructor-01.adoc[Datetime](xref:BloombergLP/bdlt/Datetime.adoc[Datetime] const& original);
----

[.small]#xref:BloombergLP/bdlt/Datetime/2constructor-01.adoc[_» more&period;&period;&period;_]#

Create a `Datetime` object whose &quot;date&quot; part has the value of the specified `date` and whose &quot;time&quot; part has the value &quot;00&colon;00&colon;00&period;000000&quot;&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlt/Datetime/2constructor-0ca.adoc[Datetime](xref:BloombergLP/bdlt/Date.adoc[Date] const& date);
----

[.small]#xref:BloombergLP/bdlt/Datetime/2constructor-0ca.adoc[_» more&period;&period;&period;_]#

Create a `Datetime` object whose &quot;date&quot; and &quot;time&quot; parts have the values of the specified `date` and `time`, respectively&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlt/Datetime/2constructor-07.adoc[Datetime](
    xref:BloombergLP/bdlt/Date.adoc[Date] const& date,
    xref:BloombergLP/bdlt/Time.adoc[Time] const& time);
----

[.small]#xref:BloombergLP/bdlt/Datetime/2constructor-07.adoc[_» more&period;&period;&period;_]#

Create a `Datetime` object whose &quot;date&quot; part has the value represented by the specified `year`, `month`, and `day` attributes, and whose &quot;time&quot; part has the value represented by the optionally specified `hour`, `minute`, `second`, `millisecond`, and `microsecond` attributes&period; Unspecified trailing optional parameters default to 0&period; The behavior is undefined unless the eight attributes (collectively) represent a valid `Datetime` value (see `isValid`)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlt/Datetime/2constructor-06.adoc[Datetime](
    int year,
    int month,
    int day,
    int hour = 0,
    int minute = 0,
    int second = 0,
    int millisecond = 0,
    int microsecond = 0);
----

[.small]#xref:BloombergLP/bdlt/Datetime/2constructor-06.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
