Reporting period with date and time

Error FX-SCH-A-000316 Factur-X

Element 'ram:CompleteDateTime' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:CompleteDateTime is missing from ram:EffectiveSpecifiedPeriod or occurs more than once. It must be present exactly once.

What the rule means

ram:CompleteDateTime contains the complete date and time for the period described by ram:EffectiveSpecifiedPeriod.

Please provide the complete date and time for the period

ram:CompleteDateTime is missing from ram:EffectiveSpecifiedPeriod or appears more than once. The rule requires exactly one such element.

What to do
  1. Locate ram:EffectiveSpecifiedPeriod in the document header.
  2. Check whether ram:CompleteDateTime is missing or occurs more than once.
  3. Ensure that ram:CompleteDateTime occurs exactly once.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:EffectiveSpecifiedPeriod/>
✓ Correct
<ram:EffectiveSpecifiedPeriod>
  <ram:CompleteDateTime>
    <udt:DateTimeString format="102">20261003</udt:DateTimeString>
  </ram:CompleteDateTime>
</ram:EffectiveSpecifiedPeriod>
Technical details

The rule uses count(ram:CompleteDateTime)=1 to check that the element occurs exactly once in the context.

Where the rule applies

The rule applies in ram:EffectiveSpecifiedPeriod within the document header ram:ExchangedDocument.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:EffectiveSpecifiedPeriod
Test expression (assert/@test)
count(ram:CompleteDateTime)=1