Show/Hide Toolbars

Therefore Web API Programming Interface 1.0

Therefore Web API > Developers Guide > Index Data

Working with Date and DateTime Fields

Scroll

There is a new DateTime field type available since Therefore 2018 release. This field type allows to store data that represents a specific date and time.

 

Alongside with old parameter called DataValue(DateTime type) in index data to set/get values for date/datetime fields a new parameter named DataISO8601Value (string represents date in ISO-8601 standard) was added to simplify value conversion for some frameworks/languages. So you can use any one (DataValue or DataISO8601Value) which is better for your case. For more details see DataValue and DataISO8601Value for both DateIndexData and DateTimeIndexData in the CreateDocument method.

 

Client Timezone

Therefore Server and it's client can operate in different time zones. There are some rules for date time values to be correctly processed.

 

Date time values in Index Data

Therefore Server operates with date time index data values in UTC time zone. Before sending index data values for date time fields to the server convert it from client's local time zone to UTC. When you retrieve index data values for date time fields from the server convert it from UTC to client's local time zone.

 

Date time values in Queries.

When you sending queries to the server (calling ExecuteSingleQuery or any other query method) you should inform the server which time zone to use for datetime values specified in query string. To do so please use one of the following HTTP headers The-Timezone-Microsoft or The-Timezone-IANA.

 

 

© 2024 Therefore Corporation, all rights reserved.