# BigQuery and observable - Datetime handling

**URL:** <https://talk.observablehq.com/t/bigquery-and-observable-datetime-handling/3123>\
**Category:** Uncategorized\
**Created:** [April 22, 2020, 1:40pm UTC](https://talk.observablehq.com/t/bigquery-and-observable-datetime-handling/3123 "2020-04-22T13:40:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbuzz123](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@dbuzz123](https://talk.observablehq.com/u/dbuzz123)\
**Post date:** [April 22, 2020, 1:40pm UTC](https://talk.observablehq.com/t/bigquery-and-observable-datetime-handling/3123/1 "2020-04-22T13:40:05Z")

</div>

Hey All,

I use simple query to extract dates BQ (stored in UTC TZ) and in BQ console they come out properly showing me UTC datetimes. Query which run from observable returns data automatically converted from UTC to my local timezone. How to avoid this behavior? Thanks!

---

<div class="post-metadata">

**Author:** ![visnup](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/visnup/32/305_2.png) [@visnup](https://talk.observablehq.com/u/visnup)\
**Post date:** [April 22, 2020, 6:07pm UTC](https://talk.observablehq.com/t/bigquery-and-observable-datetime-handling/3123/2 "2020-04-22T18:07:12Z")

</div>

Hello again!

We parse the date times so that they’re more immediately useful in your notebook. The default behavior for browser-based datetime parsing is to convert it to your browser’s time zone. I’m assuming they’re still correct, just offset?

There are two ways to handle this:

1. Keep them in Date objects, but format/convert into UTC time for display. I’ve sketched out how this could work in [https://observablehq.com/d/6a24869ef5735fe9](https://observablehq.com/d/6a24869ef5735fe9). This has the most flexibility if you want to format them specially in your notebook.

2. Cast them to a string in your SQL with `CAST(date AS STRING)` and they should come back as simple strings in your notebook.

I hope that helps?
