Your date may currently look like:
2022-10-25
All you need to convert it to the german format (dd.mm.yyyy) is:
const yourDate = "2022-10-25"; const convertedDate = new Date(yourDate).toLocaleString('de-DE').split(",")[0];
The new Date() method converts your date from string to date format and then converts it to the german format with the .toLocateString('de-DE') method. The .split() method is added to only take the part before the comma and time, that would be included. Your output should now look like:
25.10.2022