Question about $__timeGroup fill 0 with mysql

i am now using grafana web ui.
i have connect mysql successfully , and i would like to select the errors in my apps , I use mysql statement like:

SELECT 
  $__timeGroup(observationDate,'1d',0) AS time,
  count(error) AS "error"
FROM table
WHERE indicationID=2 
GROUP BY DATE(observationDate)
ORDER BY DATE(observationDate)

I expected missing data in it to be padded with 0 as I use $__timeGroup(observationDate,'1d',0)
however , the data is like

2021-08-03 08:00:00     1
2022-03-10 08:00:00     3
2022-09-02 08:00:00     2
2022-09-03 08:00:00     2
2022-09-04 08:00:00     2
2022-09-05 08:00:00     2
2022-09-06 08:00:00     2
2022-09-07 08:00:00     2
2022-09-08 08:00:00     2

There are two things that bother me ,

  1. when i use
SELECT 
  DATE(observationDate) AS time_sec,
  count(error) AS "error"
FROM table
GROUP BY time_sec

i got 2022-08-22 in navicat but 2021-08-03 08:00:00 in grafana
how can i only get %Y-%m-%d in grafana?

2.What is the reason why the function is not padded with 0 as expected?