[#BloombergLP-bdlt-Datetime-setTime-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Datetime.adoc[Datetime]::setTime :relfileprefix: ../../../ :mrdocs: Set the time part from hour and optional finer fields. == Synopsis Declared in `<bdlt_datetime.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void setTime( int hour, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0); ---- == Description Set the "time" part of this object to have the value represented by the specified `hour` attribute value and the optionally specified `minute`, `second`, `millisecond`, and `microsecond` attribute values. Unspecified trailing optional parameters default to 0. The behavior is undefined unless `hour`, `minute`, `second`, `millisecond`, and `microsecond` represent a valid "time" portion of a `Datetime` value. Note that this method has no effect on the "date" part of this object. == Parameters [cols="1,4"] |=== | Name| Description | *hour* | hour attribute | *minute* | minute attribute (default 0) | *second* | second attribute (default 0) | *millisecond* | millisecond attribute (default 0) | *microsecond* | microsecond attribute (default 0) |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#