SAP Knowledge Base Article - Public

2821437 - OData Query Builder Does Not Work With Date Time Fields

Symptom

You are using the OData query builder to create a report query, but when you try to set a variable on a datetime field, you receive the following error message:

Value YYYY-MM-DDTHH:MM:SS (YYYY-MM-DDTHH:MM:SS stands for the date and time you enter) not valid for variable ABC (ABC stands for the field for which you are trying to set the value)

Environment

  • SAP Business ByDesign
  • SAP Cloud for Customer

Reproducing the Issue

  1. Go to the work center Business Analytics and select the view Design Data Sources.
  2. Search for the data source you would like to query via OData.
  3. Click Build OData Queries.
  4. Go to Filters.
  5. Go to the datetime field, for example Last Changed Date and Time.
  6. Enter the GT or GE option.
  7. Enter any value, for example 2019-01-01T00:00:00.

You receive the above error message.

Cause

It is not recommended to use filter in "Date-Time" data type of fields in the OData Query.

Resolution

Kindly check the data source documentation, where you would find an alternate field which shows data in terms of "Date".
Try to use filter in the same and execute the query

Keywords

odata, data source, report, datetime, date_time, date time, value not valid for variable , KBA , AP-RC-ANA , C4C, ByD, Travel: Analytics Tools & Frameworks , Problem

Product

SAP Business ByDesign 1905 ; SAP Business ByDesign 1908 ; SAP Business ByDesign 2308 ; SAP Business ByDesign 2311 ; SAP Business ByDesign 2402 ; SAP Cloud for Customer core applications 1905 ; SAP Cloud for Customer core applications 1908 ; SAP Cloud for Customer core applications 2302 ; SAP Cloud for Customer core applications 2305 ; SAP Cloud for Customer core applications 2308 ; SAP Cloud for Customer core applications 2311