# Change dashboard date format

**URL:** <https://community.grafana.com/t/change-dashboard-date-format/105976>\
**Category:** Configuration\
**Created:** [October 19, 2023, 2:17pm UTC](https://community.grafana.com/t/change-dashboard-date-format/105976 "2023-10-19T14:17:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![goncalosimoesbastos](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@goncalosimoesbastos](https://community.grafana.com/u/goncalosimoesbastos)\
**Post date:** [October 19, 2023, 2:17pm UTC](https://community.grafana.com/t/change-dashboard-date-format/105976/1 "2023-10-19T14:17:27Z")

</div>

“I have a Grafana dashboard with time series charts, and currently, the date format is set as DD-MM-YYYY HH:mm:ss. I would like to know if it’s possible to change this format, but I’ve already edited the grafana.ini file, which changes the format for the entire Grafana system. Is it possible to change the date format for just this dashboard?”

I know I have multiple formats but how can I set the timeseries to use for example interval\_year.

My current query

```auto
SELECT STR_TO_DATE(CONCAT(year, '-01-01'), '%Y-%m-%d') AS time, quantity AS value
FROM net4co2.annual_green_house_gas_data
WHERE category = '$category'
ORDER BY time;

```

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/3/f/3ff53768a01b1e088334a020db1e86b265211db3.jpeg)

Current chart time display

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/5/8/5860a9dbb9841e7bddbd369026260ee7a58beac3.png)

If I changed the default system format it will be okay, but I don’t want to change all system to that format

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [October 19, 2023, 2:48pm UTC](https://community.grafana.com/t/change-dashboard-date-format/105976/2 "2023-10-19T14:48:41Z")

</div>

After editing your grafana.ini, did you restart grafana?

Also what is your data source? mysql, postgres?

Also

---

<div class="post-metadata">

**Author:** ![goncalosimoesbastos](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@goncalosimoesbastos](https://community.grafana.com/u/goncalosimoesbastos)\
**Post date:** [October 19, 2023, 5:55pm UTC](https://community.grafana.com/t/change-dashboard-date-format/105976/3 "2023-10-19T17:55:50Z")

</div>

Yes if I edit the config that I told you I got only the year on display and that’s good. But then all system has date time format with only YYYY.

I’m using MySQL for database.

---

<div class="post-metadata">

**Author:** ![ldrascic](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@ldrascic](https://community.grafana.com/u/ldrascic)\
**Post date:** [October 19, 2023, 6:17pm UTC](https://community.grafana.com/t/change-dashboard-date-format/105976/4 "2023-10-19T18:17:06Z")

</div>

Hi @goncalosimoesbastos ,  
You can use define custom unit, for example `time: DD.MM.YYYY `, for Time field in override section:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/6/c/6c2cba94e7c370498450a1a296c7a4fb16239442.png)

&nbsp;

See next post for more information:

> [@How to format X axis label](https://community.grafana.com/t/how-to-format-x-axis-label/81187/4):
>
> Hi @mrburns, Take a look at this post: Links: [Grafana | Custom units](https://grafana.com/docs/grafana/latest/panels-visualizations/configure-standard-options/)[Momentjs | Date format](https://momentjs.com/docs/#/displaying/) &nbsp; Best regards, ldrascic

&nbsp;

Best regards,  
ldrascic

---

<div class="post-metadata">

**Author:** ![goncalosimoesbastos](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@goncalosimoesbastos](https://community.grafana.com/u/goncalosimoesbastos)\
**Post date:** [October 19, 2023, 6:53pm UTC](https://community.grafana.com/t/change-dashboard-date-format/105976/6 "2023-10-19T18:53:19Z")

</div>

Thanks, works perfectly for the format time. Great job man
