# Dashboard Grails query vs Notebook Grails query - different results

**URL:** <https://community.dynatrace.com/t/dashboard-grails-query-vs-notebook-grails-query-different-results/41239>\
**Category:** DQL\
**Tags:** dql, grail, notebooks\
**Created:** [August 16, 2023, 5:37pm UTC](https://community.dynatrace.com/t/dashboard-grails-query-vs-notebook-grails-query-different-results/41239 "2023-08-16T17:37:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![garryclarke](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@garryclarke](https://community.dynatrace.com/u/garryclarke)\
**Post date:** [August 16, 2023, 5:37pm UTC](https://community.dynatrace.com/t/dashboard-grails-query-vs-notebook-grails-query-different-results/41239/1 "2023-08-16T17:37:58Z")

</div>

I have been developing the following query in a Notebook which seems to provide me accurate results

_fetch logs, from: bin(now()-6d, 1d) + 23h + 0m, to: now()_  
_| filter matchesValue(aws.log\_group, “Prod-mop-service-order-int”) and matchesPhrase(content, “HTTP\_INBOUND”) and matchesPhrase(content, “/api/mopServiceOrder”) and matchesPhrase(content, “ABC LTD”)_  
_| fieldsAdd Date= formatTimestamp(timestamp,format:“dd/MM/YYYY”)_  
_| summarize Count = count(), by:{Date}_  
_| sort Date desc_

this provides the following correct output

 ![garryclarke_0-1692205308186.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/e/0e0c3f5e732302af54b456d9e59645a144b089e7.png)

However when I drop the same query onto a Dashboard as a Grails query I get the following result set which is incorrect

 ![garryclarke_1-1692205384535.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/2/42a77075be4182c0662acb47346cc1e8856c8165.png)

The problem seems to be that&nbsp;_formatTimestamp(timestamp,format:“dd/MM/YYYY”) seems to be working correctly in Notebook but not on a Dashboard. The issue seems to be with events with a timestamp up to 1hr after the midnight boundary getting allocated to the previous day._

_Notebook_

 ![garryclarke_2-1692207130470.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/5/450706bd54f07b8298d7abeb91eaa5b0629b77bf.png)

_Dashboard_

 ![garryclarke_3-1692207327206.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/4/c4aa0edfb21be3cb7dcab3fe01fa333d7c4f5615.png)

This would seem to attribute to difference between 806 and 840

Any ideas how this would be functioning differently on a dashboard?

---

<div class="post-metadata">

**Author:** ![robaxelsen](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/robaxelsen/32/39552_2.png) [@robaxelsen](https://community.dynatrace.com/u/robaxelsen)\
**Post date:** [August 17, 2023, 8:21am UTC](https://community.dynatrace.com/t/dashboard-grails-query-vs-notebook-grails-query-different-results/41239/2 "2023-08-17T08:21:30Z")

</div>

Hi&nbsp;[@garryclarke](https://community.dynatrace.com/user/42456),&nbsp;and thanks for your post. It looks like it’s not something you can tweak on the dashboard itself, but rather a bug. It’s reported and our engineers will look into it.
