Вы можете использовать методы объекта Date
для построения строки даты:
const now = new Date();
const formattedDate = now.getDate() + "." + ('0' + (now.getMonth()+1)).slice(-2) + "." + now.getFullYear();
const formattedDateTime = formattedDate + " " + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
console.log(formattedDate); // 28.05.2019
console.log(formattedDateTime); // 28.05.2019 13:19:43