I am building a Google Data Studio connector with a field called date. The field's type is YEAR_MONTH_DAY. Now, when I return a string, for instance "2020-09-22", the field shows null as a result. What value should my connector provide to have Data Studio recognize it as a date?
What format does a Google Data Studio DATE field expect from the connector?
2.5k Views Asked by Paul At
3
There are 3 best solutions below
0
On
For some reason I have had to implement a workaround for this more often lately which is to create a new field in the data source and use the TODATE() function and use that new field in my dimensions on the report.
Try a formula field like:
TODATE(comp_pd_end, "%Y-%m-%d", "%Y%m%d")
1
On
The expected date format for the connector is YYYYMMDD, without any separator.
You can check the official documentation: https://developers.google.com/datastudio/connector/reference?hl=en#semantictype
"2020-09-22" is of type
YEAR-MONTH-DAY, notYEAR_MONTH_DAYWithout knowing the specifics of the connector you are using:
TODATEYYYYMMDD.