MYSQL Date Time Last 15 Mins Issue no Data


Having problems with a query that works fine in MYSQL and worked in reedash that im moving from but not in Metabase.
I get no results when using this as the where clause to get data in last 15 minutes

where created BETWEEN (date_sub(now(),interval 10 minute)) AND NOW()

If i take this out i get data , what am i doing wrong here ?


Hi @dazzer78
You mean data from the last 10 minutes. This is likely something to do with timezone, but you haven’t provided much details.
Please post “Diagnostic Info” from Admin > Troubleshooting.
And have a look at the troubleshooting guide:


Yes sorry 10 mins or any interval i add.
Mysql is in UTC time so will try changing that and try again

“browser-info”: {
“language”: “en-GB”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”,
“vendor”: “Google Inc.”
“system-info”: {
“file.encoding”: “UTF-8”,
“”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.7+10”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “”,
“java.version”: “11.0.7”,
“”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.7+10”,
“”: “Linux”,
“os.version”: “5.4.0-39-generic”,
“user.language”: “en”,
“user.timezone”: “GMT”
“metabase-info”: {
“databases”: [
“hosting-env”: “unknown”,
“application-database”: “h2”,
“application-database-details”: {
“database”: {
“name”: “H2”,
“version”: “1.4.197 (2018-03-18)”
“jdbc-driver”: {
“name”: “H2 JDBC Driver”,
“version”: “1.4.197 (2018-03-18)”
“run-mode”: “prod”,
“version”: {
“date”: “2020-05-28”,
“tag”: “v0.35.4”,
“branch”: “release-0.35.x”,
“hash”: “b3080fa”
“settings”: {
“report-timezone”: “Europe/London”

Timezone was the issue , set Metabase to use default DB timezone and all good now


1 Like

@dazzer78 Excellent. Remember to migrate away from H2, if you’re running Metabase in production: