Mysql datediff({{create_day}}, create_day) variable use like this query nothing?

mysql datediff({{create_day}}, create_day) variable use like this not query any thing?
I'm not sure this is a bug or my use way is wrong ,when i use mysql query with datediff id need set a variable {create_day}}, when use metabse query out nothing , but when i exexute the query on mysql client , has result .mysql sql is: select count(id) from vt_nextop_order_info where datediff('2022-01-02', update_day)=1,Has anyone ever encountered this problem, Give me some advice,thanks

Hi @abo123456789
Please post "Diagnostic Info" from Admin > Troubleshooting.
And which type of variable are you using, Date or Field Filter? Your example has to use Date.

type of variable is Date

@abo123456789

  1. Please post "Diagnostic Info" from Admin > Troubleshooting.
  2. Post a screenshot of your query with the variable sidebar open
  3. What is the actual column type in MySQL of create_day?
  1. mysql create_day catual dolumn type is varchar

@abo123456789 You are using a "Field Filter". Change it to "Date" instead, then it will work.

it works ,thanks.