Regex expression does not work on version 10

Hi everyone,

I’m currently facing an issue with a regular expression in Grafana. I’m trying to extract just the date from a timestamp like this: 2025-05-28T00:00:00.000Z

The regular expression I’m using is: ^(.?)T.$

In the Grafana Playground, this regex works perfectly - it matches the full string and captures just the date portion (2025-05-28) in group 1. However, when I try to use the same regex in Grafana version 10, it doesn’t seem to work as expected.

Has anyone encountered this behavior in version 10? Is there a change in how regex is parsed or applied between the Playground and the actual dashboard version? Or is there a workaround to reliably extract just the date from an ISO 8601 timestamp in Grafana 10?

Thanks in advance!

Image from playground

Image from v10

You can use units for that (override only for time column if you have several columns):

Example of Units value:
time: YYYY-MM-DD

That solution does not work for my case. I dont want to force the format because i want to use datetime local to convert to MM-DD-YYYY or DD-MM-YYYY based on location

What is you datasource, may be it is better to do such type of conversion there?

The datasource column is on ISO format and at this moment changing the format is not an option

Hi, in your screen from v10 don’t you miss another .* after T in your regex?

Hi, thanks for the warning. I updated the screeshot showing that the corrected expression does not work. The previous screenshoot was showing an equivalente regex expression that also does not work on v10