About using variables to filter dates

Our current version is 0.33.7.3

In MySQL library, some of our field types representing date are string. When we use the date variable in metabase, we will use the following writing method


It can be seen that there is data on June 27.
When I select June 27 in the filter box of date variable, the data can be filtered normally.

Now we have tested the new version 0.35.4
The same SQL and the same library

When filtering date June 27 in version 0.35.4, there is no data

I have to cast the fields in the table to the date type for the filter to take effect

I wonder if this is normal

Also, in 0.35.4, Chinese cannot be displayed correctly in the date filter box. I have set the global date type and language

0.35.4:
{
“browser-info”: {
“language”: “zh-CN”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“java.runtime.name”: “Java™ SE Runtime Environment”,
“java.runtime.version”: “1.8.0_45-b14”,
“java.vendor”: “Oracle Corporation”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_45”,
“java.vm.name”: “Java HotSpot™ 64-Bit Server VM”,
“java.vm.version”: “25.45-b02”,
“os.name”: “Linux”,
“os.version”: “3.10.0-957.el7.x86_64”,
“user.language”: “en”,
“user.timezone”: “Asia/Shanghai”
},
“metabase-info”: {
“databases”: [
“h2”,
“mysql”,
“sparksql”,
“presto”
],
“hosting-env”: “unknown”,
“application-database”: “mysql”,
“run-mode”: “prod”,
“version”: {
“tag”: “v0.33.7.3”,
“date”: “2019-12-16”,
“branch”: “release-0.33.x”,
“hash”: “7ee7193”
},
“settings”: {
“report-timezone”: “Asia/Hong_Kong”
}
}
}

0.33.7.3:
{
“browser-info”: {
“language”: “zh-CN”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“java.runtime.name”: “Java™ SE Runtime Environment”,
“java.runtime.version”: “1.8.0_45-b14”,
“java.vendor”: “Oracle Corporation”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_45”,
“java.vm.name”: “Java HotSpot™ 64-Bit Server VM”,
“java.vm.version”: “25.45-b02”,
“os.name”: “Linux”,
“os.version”: “3.10.0-957.el7.x86_64”,
“user.language”: “en”,
“user.timezone”: “Asia/Shanghai”
},
“metabase-info”: {
“databases”: [
“h2”,
“mysql”,
“sparksql”,
“presto”
],
“hosting-env”: “unknown”,
“application-database”: “mysql”,
“run-mode”: “prod”,
“version”: {
“tag”: “v0.33.7.3”,
“date”: “2019-12-16”,
“branch”: “release-0.33.x”,
“hash”: “7ee7193”
},
“settings”: {
“report-timezone”: “Asia/Hong_Kong”
}
}
}

@rayn

There were a lot of changes in 0.34 to avoid casting unnecessarily, which would break indexes, so queries would be very slow on large datasets.

Your date_id column is not a DATE column type, so you would need to manually cast it, or change the type in your database, or create a database view.

As for the missing translation of the calendar, there’s an issue for that:
https://github.com/metabase/metabase/issues/8964 - upvote by clicking :+1: on the first post

I see. Thank you!