get moment date without time 1

get moment date without time

console.log( moment().format('YYYY-MM-DD HH:mm:ss') )

console.log( moment({h:0, m:0, s:0, ms:0}).format('YYYY-MM-DD HH:mm:ss') )

Here is what the above code is Doing:
1. We’re using the moment() function to create a new moment object.
2. We’re using the format() function to format the moment object as a string.
3. We’re using the format() function to format the moment object as a string.

Similar Posts