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

Set the &quot;hour&quot; attribute of this object to the specified `hour` value&period; If `24 &equals;&equals; hour`, set the `minute`, `second`, `millisecond`, and `microsecond` attributes to 0&period; The behavior is undefined unless `0 &lt;&equals; hour &lt;&equals; 24`&period; Note that this method has no effect on the &quot;date&quot; part of this object&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setHour(int hour);
----


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