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

This utility `struct`, `IntervalConversionUtil`, defines functions to convert between `bsls&colon;&colon;TimeInterval` and `bdlt&colon;&colon;DatetimeInterval` representations of time intervals&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct IntervalConversionUtil;
----

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/IntervalConversionUtil/convertToDatetimeInterval.adoc[`convertToDatetimeInterval`] 
| Return as a `bdlt&colon;&colon;DatetimeInterval` the (approximate) value of the specified `interval` truncated toward zero, to microsecond resolution&period; The behavior is undefined unless the value of `interval`, expressed with nanosecond precision, is within the range of time intervals supported by a `DatetimeInterval` &hyphen;&hyphen; i&period;e&period;, `DT&lowbar;MIN &ast; 10&circ;6 &lt;&equals; TI&lowbar;NSECS &lt;&equals; DT&lowbar;MAX &ast; 10&circ;6`, where `TI&lowbar;NSECS` is the total number of nanoseconds in `interval`, `DT&lowbar;MIN` is the lowest (negative) value expressible by `DatetimeInterval`, and `DT&lowbar;MAX` is the highest (positive) value expressible by `DatetimeInterval`&period; Note that, while `bsls&colon;&colon;TimeInterval` has nanosecond resolution, `bdlt&colon;&colon;DatetimeInterval` has only microsecond resolution&period;
| xref:BloombergLP/bdlt/IntervalConversionUtil/convertToTimeInterval.adoc[`convertToTimeInterval`] 
| Return as a `bsls&colon;&colon;TimeInterval` the value of the specified `interval`&period;
|===



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