[#BloombergLP-bdlt-FixUtil-parse-0db]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/FixUtil.adoc[FixUtil]::parse
:relfileprefix: ../../../
:mrdocs:

Parse the specified initial `length` characters of the specified FIX `string` as a `Datetime` value, and load the value into the specified `result`&period; Return 0 on success, and a non&hyphen;zero value (with no effect) otherwise&period; `string` is assumed to be of the form&colon; &grave; YYYYMMDD&hyphen;hh&colon;mm&lcub;&colon;ss&lcub;&period;s&plus;&rcub;&rcub;&lcub;(&plus;&verbar;&hyphen;)hh&lcub;&colon;mm&rcub;&verbar;Z&rcub; &grave; _Exactly_ `length` characters are parsed&semi; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `length` characters do not&period; If an optional fractional second having more than six digits is present in `string`, it is rounded to the nearest value in microseconds&period; If the optional timezone offset is present in `string`, the resulting `Datetime` value is converted to the equivalent UTC value&semi; if the timezone offset is absent, UTC is assumed&period; If a leap second is detected (i&period;e&period;, the parsed value of the `second` attribute is 60&semi; see &lcub;Leap Seconds&rcub;), the `second` attribute is taken to be 59, then an additional second is added to `result` at the end&period; The behavior is undefined unless `0 &lt;&equals; length`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
parse(
    xref:BloombergLP/bdlt/Datetime.adoc[Datetime]* result,
    char const* string,
    int length);
----


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