Does anyone know of a JavaScript ES7 method that can convert the output of new Date()
into the format shown below? If there isn't a built-in method, I am willing to manually parse or find/replace it myself.
2020-06-30 07.49.28
I would like the date with hyphens and the time with periods.
Currently working with TypeScript in Angular 8, but regular JavaScript syntax will also suffice.
If there is an Angular Method, Moment.js, Lodash, or any other library method that can achieve this, please let me know.
If none are available, I'm open to using the simplest find/replace or regex method to format the date and time.