[#BloombergLP-bdlt-Datetime-setHour] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Datetime.adoc[Datetime]::setHour :relfileprefix: ../../../ :mrdocs: Set the "hour" attribute of this object to the specified `hour` value. If `24 == hour`, set the `minute`, `second`, `millisecond`, and `microsecond` attributes to 0. The behavior is undefined unless `0 <= hour <= 24`. Note that this method has no effect on the "date" part of this object. == Synopsis Declared in `<bdlt_datetime.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void setHour(int hour); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#