You are correct, the length attribute should not be present for date/time variables. How did you generate your define.xml, was it through The Pinnacle 21 Community Define.xml tool or some other process? Let me know and we can sort this out.
Ok, would you be able to look in the define.xml file you validated and confirm that the ‘DataType’ attribute for the RFSTDTC variable is actually set to datetime? I have a suspicion that the datatype may be incorect. It could be set to the general ‘text’ datatype. You can also import your define.xml into our Define.xml Tool and look inside the generated Excel specification to see what the datatype is for RFSTDTC.
OK, that is good. And just to make sure there are no length attributes on the elements with ‘partialDatetime’ or ‘date’ DataTypes? Even an empty Length attribute with can cause this issue.
Yes, that is highly probably the reason…
People should really start learning XML basics - my undergraduate students learn all this in 2 x 1,5 hours …
In XML, there is a big difference between the absence of an attribute, the presence of an attribute with empty value, and the presence of an attribute with one or more blanks as the value.
Also be aware that XML is case sensitive:
Length=“8” and length=“8” are 2 completely different things.
Here is a good link to start learning the basics of XML: XML Tutorial
Always think carefully what your data is or will be when creating your define.xml. For example, if you may have unplanned visits, always assign “float”, e.g. with “SignificantDigits” being equal to 1 (if you do not expect to go e.g. beyond x.9). --DOSE is a typical case where you will have floating point numbers. The same applies to vital signs–STRESN where you may have a mix of integers and floats. It is not because the outdated SAS-XPT format only knows the “numeric” format, that these will all be inrtegers. All your definitions say “integer”.
So again, know what data to expect before you start crrating your define.xml. You can of course always adapt when at the end of the ride …
Actually, in case you have a SAS format 6.3, for floats that have a pattern of xx.xxx, the length is 5.
From the Define-XML 2.1 specification:
In the case of DataType=“float”, if DataType=float, Length=N and SignificantDigits=S is a requirement that the receiving system be able to process and store all numeric values of magnitude less than 10N-S that are multiples of 10-S." For example, if the value has a pattern xxx.xx, then Length=5 and S=2.
The Define-XML specification is based on ODM. The ODM specification states: