I'm currently trying to format a timestamp in JavaScript. Sadly, the result is a bit strange. This is the date I'm trying to format:
Thu May 23 2019 17:34:18 GMT+0200 (Mitteleuropäische Sommerzeit)
And this is how it should looks like after formatting it:
23.05.2019
This is my code:
j = myDateString;
console.log(j.getUTCDate() + "." + j.getUTCMonth() + "." + j.getUTCFullYear());
But when I run my code, this is the result:
23.4.2019