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

Parse a FIX date&hyphen;tz string of the given length into a `DateTz`&period;

== Synopsis

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

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

== Description

Parse the specified initial `length` characters of the specified FIX `string` as a `DateTz` 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&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 the optional timezone offset is not present in `string`, UTC is assumed&period; The behavior is undefined unless `0 &lt;&equals; length`&period;

== Return Value

0 on success, non&hyphen;zero on failure

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| destination for the parsed value
| *string*
| FIX input string
| *length*
| number of characters to parse
|===


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