KNOWLEDGE BASE

Cannot Filter a Date Format Field When Using REST API Query View Data


Published: 02 Sep 2021
Last Modified Date: 08 Sep 2021

Issue

Cannot filter a date format field with the following format yyyy/mm/dd when using REST API - Query View Data, while the other fields can be successfully filtered.

Environment

  • Tableau Server 2020.4.5
  • Amazon Linux 2

Resolution

Even when the format of the date format field is yyyy/mm/dd, try to specify the format in a yyyy-mm-dd way.

In the REST API example below, the data is filtered by Target Date and the filtered data comes back in the response body when the date format is requested in the yyyy-mm-dd format.

GET https://<Tableau Server>/api/3.10/sites/<site_id>/views/<table_view_id>/data?vf_Target+Date=2021-07-29

Response body:
City,Target Date,Value
Nagoya,7/29/2021,3
Osaka,7/29/2021,2
Tokyo,7/29/2021,1

Cause

The data format must be formatted in the yyyy-mm-dd way.
Did this article resolve the issue?