Date Filter with Different Time Zones

Hi, currently having problem with the query below, I would like to filter by the create at time, however. I have to change the date and time zone. I don't know how I can change the time zone in fields filters to match this.

SELECT TIMESTAMP_TRUNC(DATETIME(`shopify.order`.`created_at`,"Asia/Bangkok"), DAY) AS `created_at`, 
       COUNT(DISTINCT `shopify.order`.`customer_id`) AS `count`
  FROM `shopify.order`

GROUP BY `created_at`
ORDER BY `created_at` ASC
WHERE {{date}}

Hi @natti
You would have to create a database View with the converted timezone.

1 Like