Answers for "convert date online in moment js"

9

moment to date

moment().toDate();
Posted by: Guest on February-27-2020
0

datetime to date moment

//date time to date momentjs
var support_date = new Date("2021-10-23 00:00:00");
support_date = moment(support_date).format("YYYY-MM-DD");

//output:"2021-10-23"
Posted by: Guest on October-22-2021
0

convert date online in moment js

moment().format('MMMM Do YYYY, h:mm:ss a'); // October 26th 2021, 3:38:35 pm
moment().format('dddd');                    // Tuesday
moment().format("MMM Do YY");               // Oct 26th 21
moment().format('YYYY [escaped] YYYY');     // 2021 escaped 2021
moment("2021-10-27 02:45 PM").format();                          // 2021-10-26T15:38:35+05:00
Posted by: Guest on October-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language