DateTime

Description

DateTime can be used in case the exact point in time is needed/ useful in a context (e.g. Measurement/ startDate).

Use

DateTime is used to store specific points or periods in time e.g. measurement of blood pressure during a long term observation.

Not use

Do not use for data that does not need time information.

Data Model

Name Type M Description Example
dateTime String X Contains the date, format must follow a pattern (see rules) “2014-05-09T08:01:07.143”

Rules

The pattern for the dateTime string is (d means digit):

4 d d:0 or 1 d d:0 till 3 d T d:0 till 2 d : d:0 till 5 d : d:0 till 5 d . 3 d + or – 2 d : 2 d
y month day hour (24h) min sec milli-sec time shift

What gives following options:

Coded date Equivalent date
2014-10-13T11:24:57 October 13th 2014 at 11:24 and 57 seconds
2014-10-13T11:24:57.321 October 13th 2014 at 11:24, 57 seconds and 321 milliseconds
2014-10-13T11:24:57+08:00 October 13th 2014 at 11:24, 57 seconds in time zone UTC+8 (Singapore)
2014-10-13T11:24:57.543+08:00 October 13th 2014 at 11:24, 57 seconds and 321 milliseconds in UTC+8

Update Rhythm

Depends on use case. Creation dates of other records are only set once but “last change” information to a dataset could be set more often.

Schema

{
“id”: “/core/DateTime”,
“$schema”: “http://json-schema.org/draft-04/schema#”,
“type”: “string”,
“pattern”: “^d{4}-[01]d-[0-3]dT[0-2]d:[0-5]d:[0-5]d(?:.d{3})?(?:[+-]d{2}:d{2})?$”
}