Usage of Time, Date and Timestamp data types

Odata-provider supports time, date and timestamp as data types.

Time

Time will be represented with the format of "HH:MM:SS". The underlying database data structure DATE is used to store Time values

Date

Date will be reprenseted with the format of "YYYY-MM-DD". If you need to include the time component as well, then Timestamp data type should be used. The underlying database data structure DATE is used to store Date values.

Timestamp

Time stamp has two usages.


Without precision value

If you don't specify the precision value, the precision will be taken as 0. (i.e., no fractional second information can be included in the parameter/attribute)

Projection Syntax:

attribute Birthday Timestamp;

Representation of date time value should follow the format of "YYYY-MM-DDThh:mm:ssTZD". (eg: 1997-07-16T19:20:30+01:00)

Since there are no fractional values allowed the underlying database type will be set to DATE.


With precision value

If you specify the precision value, then it is allowed to use fractional second values up to the precision value specified.

Projection Syntax:

attribute Birthday Timestamp(3);

Representation of date time value should follow the format of "YYYY-MM-DDThh:mm:ss.sssTZD". (eg: 1997-07-16T19:20:30.456+01:00)

Please Note that Timestamp Parameters with precision is not supported

Since fractional second information is included the underlying database data type will be set to TIMESTAMP