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

`setDatetime` overloads

== Synopses

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

Set this object to the specified `date` and `time`&period;


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

[.small]#xref:BloombergLP/bdlt/Datetime/setDatetime-08.adoc[_» more&period;&period;&period;_]#

Set this object to the specified `date` and optional time fields&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlt/Datetime/setDatetime-09.adoc[setDatetime](
    xref:BloombergLP/bdlt/Date.adoc[Date] const& date,
    int hour = 0,
    int minute = 0,
    int second = 0,
    int millisecond = 0,
    int microsecond = 0);
----

[.small]#xref:BloombergLP/bdlt/Datetime/setDatetime-09.adoc[_» more&period;&period;&period;_]#

Set this object from year, month, day, and optional time fields&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlt/Datetime/setDatetime-0d.adoc[setDatetime](
    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/setDatetime-0d.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *date*
| date part to set
| *time*
| time part to set
| *hour*
| hour attribute (default 0)
| *minute*
| minute attribute (default 0)
| *second*
| second attribute (default 0)
| *millisecond*
| millisecond attribute (default 0)
| *microsecond*
| microsecond attribute (default 0)
| *year*
| year attribute
| *month*
| month attribute
| *day*
| day&hyphen;of&hyphen;month attribute
|===


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