Remove fields not needed from date input

I used the following script to autofill an input date with current date/time

var today = moment().format('YYYY-MM-DD');
document.getElementById("MyDate").value = today; 

Output :

Date : 2022-03-09 11:39:19.000000,3,Europe/Berlin

Would it be possible to remove the timezone… etc.

So the output will look like :

Date : 2022-03-09 11:39:19