You can do this something like
this.todayDate = new Date();
this.dateToday = (this.todayDate.getFullYear() + '-' + ((this.todayDate.getMonth() + 1)) + '-' + this.todayDate.getDate() + ' ' +this.todayDate.getHours() + ':' + this.todayDate.getMinutes()+ ':' + this.todayDate.getSeconds());
You can check with console log,
console.log('today date', this.dateToday);
The output will be
today date 2017-10-3 10:38:10
Explaination:
"this.dateToday" is a variable of type any which will store the date as you want.
You need to get individual year, month, date and the time as well and concat it together.
There are many more date methods you can check online or in your IDE.
toISOString: developer.mozilla.org/de/docs/Web/JavaScript/Reference/…