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

Add the specified time components to this datetime&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlt/Datetime.adoc[Datetime]&
addTime(
    xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] hours,
    xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] minutes = 0,
    xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] seconds = 0,
    xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] milliseconds = 0,
    xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] microseconds = 0);
----

== Description

Add the specified number of `hours`, and the optionally specified number of `minutes`, `seconds`, `milliseconds`, and `microseconds` to the value of this object, adjusting the &quot;date&quot; part of this object accordingly&period; Unspecified trailing optional parameters default to 0&period; Return a reference providing modifiable access to this object&period; If `24 &equals;&equals; hour()` on entry, set the `hour` attribute to 0 before performing the addition&period; The behavior is undefined unless the resulting value is in the valid range for a `Datetime` object&period; Note that each argument independently may be positive, negative, or 0&period;

== Return Value

reference to this object

== Parameters

[cols="1,4"]
|===
| Name| Description
| *hours*
| number of hours to add
| *minutes*
| number of minutes to add (default 0)
| *seconds*
| number of seconds to add (default 0)
| *milliseconds*
| number of milliseconds to add (default 0)
| *microseconds*
| number of microseconds to add (default 0)
|===


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