DATE_TRUNC_STR with 'week' not working in Analytics query

DATE_TRUNC_STR doesn’t work in Analytics query with part ‘week’.

Given the following query:
SELECT DATE_TRUNC_STR('2016-05-18T03:59:00Z', 'week') as week

This produces the correct result when run in the Query Editor:

[
  {
    "week": "2016-05-15T00:00:00Z"
  }
]

,but returns a wrong null value when run in the analytics query editor:

[
  {
    "week": null
  }
]

I couldn’t find any open issues or documentation regarding this issue.

Any help is greatly appreciated.

I was able to reproduce this and opened a new case - Loading...

Only MILLENNIUM, CENTURY, DECADE, YEAR, QUARTER, MONTH, DAY, HOUR, MINUTE, SECOND and MILLISECOND are currently supported.

These are not : WEEK, DAY_OF_YEAR, DAY_OF_WEEK, TIMEZONE, TIMEZONE_HOUR, TIMEZONE_MINUTE

Mike.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.