[#BloombergLP-bdlt-Datetime-setDatetime-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Datetime.adoc[Datetime]::setDatetime
:relfileprefix: ../../../
:mrdocs:

Set the value of this object to a `Datetime` whose &quot;date&quot; part has the value represented by the specified `date`, and whose &quot;time&quot; part has the value represented by the specified `time`&period;

== Synopsis

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

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


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