Thanks, pointed me in the right direction.
Just had to add this before the regex.
SQLTimeString = SQLTimeString .substring(0, SQLTimeString .length - 4);
DateTime come in with .000 in the end from SQL “2025-06-13 07:30:00.000”
Then the regex does not work.
So just removed the last 4 chars.