# date-time pattern

**URL:** <https://discourse.openehr.org/t/date-time-pattern/15266>\
**Category:** Technical (archive)\
**Created:** [2 September 2013 12:55 UTC](https://discourse.openehr.org/t/date-time-pattern/15266 "2013-09-02T12:55:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [2 September 2013 12:55 UTC](https://discourse.openehr.org/t/date-time-pattern/15266/1 "2013-09-02T12:55:26Z")

</div>

I have received a few archetypes created with the LinkEHR editor.

In there is a dateTime pattern like this:  
time existence matches {1..1} matches {???-??-??T??:??:??}

I wonder if it is a legal pattern according to the specifications. I must say that it is an EN13606 archetype.

If it is legal, then we (or me) need to change the Java-software, because at this time, it does not accept this pattern.

se.acode.openehr.parser.ParseException: Encountered " "?" "? "" at line 200, column 136.  
Was expecting:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"}" ...

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at se.acode.openehr.parser.ADLParser.generateParseException(ADLParser.java:7258)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at se.acode.openehr.parser.ADLParser.jj\_consume\_token(ADLParser.java:7122)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at se.acode.openehr.parser.ADLParser.c\_attribute(ADLParser.java:2801)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at se.acode.openehr.parser.ADLParser.c\_complex\_object\_body(ADLParser.java:2578)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at se.acode.openehr.parser.ADLParser.c\_complex\_object(ADLParser.java:2561)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at se.acode.openehr.parser.ADLParser.c\_object(ADLParser.java:2606)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at se.acode.openeh............................................

Can someone please comment on this?

Thanks in advance  
Bert

---

<div class="post-metadata">

**Author:** ![yampeku](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yampeku/32/25_2.png) [@yampeku](https://discourse.openehr.org/u/yampeku)\
**Post date:** [2 September 2013 13:17 UTC](https://discourse.openehr.org/t/date-time-pattern/15266/2 "2013-09-02T13:17:02Z")

</div>

I think we changed this somewhere in the past. Now we only allow date as yyyy-mm-dd or yyyy-??-?? and times as hh:mm:ss, hh:mm:?? or hh:mm:XX (as we haven’t been able to find use cases for the all question marks dateTime).

Having said that, LinkEHR parses ???-??-??T??:??:?? but it is interpreted as yyyy-??-??

We are preparing a new version of LinkEHR lite with all these changes

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [2 September 2013 13:22 UTC](https://discourse.openehr.org/t/date-time-pattern/15266/3 "2013-09-02T13:22:57Z")

</div>

> I think we changed this somewhere in the past. Now we only allow date as yyyy-mm-dd or yyyy-??-?? and times as hh:mm:ss, hh:mm:?? or hh:mm:XX (as we haven't been able to find use cases for the all question marks dateTime).
> 
> Having said that, LinkEHR parses ???-??-??T??:??:?? but it is interpreted as yyyy-??-??

Ahhh, thanks, that saves me a lot of trouble. 🙂  
I change the archetypes accordingly

> We are preparing a new version of LinkEHR lite with all these changes

please make it also 64 bit for Linux, I cannot get to run a 32 bits JVM on my machine, and I am afraid if I try too hard, maybe nothing will run after that ☹

Bert

---

<div class="post-metadata">

**Author:** ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)\
**Post date:** [2 September 2013 14:49 UTC](https://discourse.openehr.org/t/date-time-pattern/15266/4 "2013-09-02T14:49:08Z")

</div>

it shouldn't be a legal pattern - at least year has to be specified. if you really meant to specify 'any date/time' then you want this:

time existence matches {1} matches {\*}

assuming 'time' has been declared in the RM as DATE\_TIME or some equivalent.

- thomas
