i want to print this date: 21.10.2022
with following timestamp: 1666344563
my code:
new Date(parseInt(element.createdAt)).toLocaleDateString())
FYI element.createdAt = '1666344563'
it prints in chrome: 20.01.1970
can someone explain whats happening here?