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

Set the minute attribute if it is in range&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
setMinuteIfValid(int minute);
----

== Description

Set the &quot;minute&quot; attribute of this object to the specified `minute` value if `0 &lt;&equals; minute &lt;&equals; 59`&period; If `24 &equals;&equals; hour()`, set the `hour` attribute to 0&period; Return 0 on success, and a non&hyphen;zero value (with no effect) otherwise&period; Note that this method has no effect on the &quot;date&quot; part of this object&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *minute*
| minute attribute to set
|===


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