Variable getting first 10 characters of timestamp

I am using Grafana 7.3 and in Windows 10

I am trying to get the date from this (2022-10-12T03:10:48.021Z) timestamp, which is becoming the first 10 characters.

I tried different approaches using regex, and my recent one is to get the first 10 characters of the timestamp using ^.{0,10} I tested in and it is working there, but when I am trying it within Grafana variable it is not working.

Or maybe any of you have a different approach to convert this Unix timestamp in Grafana to a readable date and time.

I Googled quite a lot but I am not getting any solution, maybe any of you guys have tried so.