# \#datetime

**URL:** https://discuss.dgraph.io/tag/datetime/198.md

[Latest](https://discuss.dgraph.io/latest.md) · [Categories](https://discuss.dgraph.io/categories.md) · [Tags](https://discuss.dgraph.io/tags.md)

---

## [Specify time zone](https://discuss.dgraph.io/t/specify-time-zone/13809)

<div class="topic-metadata">

**Author:** [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Replies:** 6\
**Last updated:** [April 21, 2021, 1:49pm UTC](https://discuss.dgraph.io/t/specify-time-zone/13809 "2021-04-21T13:49:35Z")

</div>

What I want to do Because the query result of Datetime type data is inconsistent with the written result, can we set a different time zone for dgraph? Dgraph metadata dgraph versionDgraph version : v20.11.2 Dgraph cod…

---

## [Unable to use time.Time for datetime predicate](https://discuss.dgraph.io/t/unable-to-use-time-time-for-datetime-predicate/10597)

<div class="topic-metadata">

**Author:** [@zebon43](https://discuss.dgraph.io/u/zebon43)\
**Replies:** 1\
**Last updated:** [September 25, 2020, 12:09pm UTC](https://discuss.dgraph.io/t/unable-to-use-time-time-for-datetime-predicate/10597 "2020-09-25T12:09:00Z")

</div>

I have below data struct create which represents a node and its predicates in Dgraph //Namespace Data strcuture for Dgraph database type Namespace struct { Node Name string \`json:"name,omitempty"\` Mar…

---

## [Calculating interval](https://discuss.dgraph.io/t/calculating-interval/10582)

<div class="topic-metadata">

**Author:** [@youyin123](https://discuss.dgraph.io/u/youyin123)\
**Replies:** 2\
**Last updated:** [September 25, 2020, 9:47am UTC](https://discuss.dgraph.io/t/calculating-interval/10582 "2020-09-25T09:47:17Z")

</div>

hi, @MichelDiz How to calculate the interval between the date and 2020-05-21? I want to run code like this, but it’s error… math(since(date) - since(2020-05-21))

---

## [Don't understand DateTime search index in GraphQL](https://discuss.dgraph.io/t/dont-understand-datetime-search-index-in-graphql/10062)

<div class="topic-metadata">

**Author:** [@gorillastanley](https://discuss.dgraph.io/u/gorillastanley)\
**Replies:** 7\
**Last updated:** [September 7, 2020, 4:51am UTC](https://discuss.dgraph.io/t/dont-understand-datetime-search-index-in-graphql/10062 "2020-09-07T04:51:11Z")

</div>

To clarify, if I do: type Cat { birthDate: DateTime @search(by: \[day\]) } and then try to find a Cat that has birthDate equal to some date D, it’ll only compare up to the day and ignore hours, minutes and seconds e…
