[#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 `<bdlt_datetime.h>` Set the value of this object to a `Datetime` whose "date" part has the value represented by the specified `date`, and whose "time" part has the value represented by the specified `time`. [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..._]# Set the value of this object to a `Datetime` whose "date" part has the value represented by the specified `date`, and whose "time" part has the value represented by the optionally specified `hour`, `minute`, `second`, `millisecond`, and `microsecond` attributes. Unspecified trailing optional parameters default to 0. The behavior is undefined unless the attributes (collectively) represent a valid `Datetime` value (see `isValid`). [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..._]# Set the value of this object to a `Datetime` whose "date" part has the value represented by the specified `year`, `month`, and `day` attributes, and whose "time" part has the value represented by the optionally specified `hour`, `minute`, `second`, `millisecond`, and `microsecond` attributes. Unspecified trailing optional parameters default to 0. The behavior is undefined unless the eight attributes (collectively) represent a valid `Datetime` value (see `isValid`). [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..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#