[#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::TimeInterval` and `bdlt::DatetimeInterval` representations of time intervals. == Synopsis Declared in `<bdlt_intervalconversionutil.h>` [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::DatetimeInterval` the (approximate) value of the specified `interval` truncated toward zero, to microsecond resolution. The behavior is undefined unless the value of `interval`, expressed with nanosecond precision, is within the range of time intervals supported by a `DatetimeInterval` ‐‐ i.e., `DT_MIN * 10ˆ6 <= TI_NSECS <= DT_MAX * 10ˆ6`, where `TI_NSECS` is the total number of nanoseconds in `interval`, `DT_MIN` is the lowest (negative) value expressible by `DatetimeInterval`, and `DT_MAX` is the highest (positive) value expressible by `DatetimeInterval`. Note that, while `bsls::TimeInterval` has nanosecond resolution, `bdlt::DatetimeInterval` has only microsecond resolution. | xref:BloombergLP/bdlt/IntervalConversionUtil/convertToTimeInterval.adoc[`convertToTimeInterval`] | Return as a `bsls::TimeInterval` the value of the specified `interval`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#