# Date and time datatypes

**URL:** <https://forum.fixtrading.org/t/date-and-time-datatypes/9245>\
**Category:** General Q&A\
**Tags:** fixml, xid\_165088, imported\
**Created:** [April 1, 2011, 11:53am UTC](https://forum.fixtrading.org/t/date-and-time-datatypes/9245 "2011-04-01T11:53:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andykey\_x](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@andykey\_x](https://forum.fixtrading.org/u/andykey_x)\
**Post date:** [April 1, 2011, 11:53am UTC](https://forum.fixtrading.org/t/date-and-time-datatypes/9245/1 "2011-04-01T11:53:46Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![andykey\_x](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@andykey\_x](https://forum.fixtrading.org/u/andykey_x)\
**Post date:** [April 1, 2011, 11:53am UTC](https://forum.fixtrading.org/t/date-and-time-datatypes/9245/2 "2011-04-01T11:53:46Z")

</div>

I’ve been reading [http://www.fixprotocol.org/documents/4483/FIX-5.0\_SP2\_VOL-1.pdf](http://www.fixprotocol.org/documents/4483/FIX-5.0_SP2_VOL-1.pdf), and trying to understand the date and time related datatypes.

In particular, the mapping between tag=value and FIXML forms.  
The nub of my problem is that xs:dateTime, xs:time and xs:date types allow Z|(+|-)OO[:oo] suffix.  
Only TZTimestamp has a similar provision in the tag=value form.

UTCTimestamp is xs:dateTime in FIXML  
UTCTimeOnly is xs:time in FIXML  
UTCDateOnly is xs:date in FIXML  
When mapping from tag=value to FIXML, it looks ok to not append a suffix, or maybe just append Z.  
When mapping from FIXML to tag=value, it seems we’d need to somehow correct for any suffix we encounter.  
This could be problematic, as adjusting the hours in a UTCTimeOnly field could impact the date in a related UTCDateOnly field (and how do we know which fields are related in this way).  
Or is it more accurate to say that although the Unified FIX Repository and schemas use xs:dateTime, xs:time, xs:date, and although these allow suffixes, in fact suffixes are not allowed in FIXML documents?

LocalMktData is xs:date in FIXML  
If we converted tag=value to FIXML, its not clear where we’d get the suffix to use from.  
If a FIXML document had a suffix, and we were converting to tag=value, what would we do with it?  
Or again, despite use of xs:date, is this disallowed?

TZTimeOnly is xs:time in FIXML  
If we converted tag=value to FIXML, its not clear where we’d get the suffix to use from.  
If a FIXML document had a suffix, and we were converting to tag=value, what would we do with it?  
Or again, despite use of xs:time, is this disallowed?

TZTimestamp is xs:dateTime in FIXML  
If the FIXML document had a suffix, and we were converting to tag=value, it would simply be copied. This looks fine.

I do see suffixes in sample FIXML documents I’ve found, eg: in @Snt and @TxnTm, of type UTCTimestamp.

So what was the intent of the FIXML designers?  
Use xs: types because they are a superset of the tag=value patterns, or to somehow fully support the full semantic of the xs: types?

Unrelated, but also problematic: I also see FIXML documents which use the tag=value notation for date (eg: 20110402 rather than 2011-04-02), and thus don’t validate against the schemas.

{{{ Andy
