Answers for "how to get only month and year in js"

4

how to get only month and year in js

let dateObj = new Date();

let myDate = (dateObj.getUTCFullYear()) + "/" + (dateObj.getMonth() + 1)+ "/" + (dateObj.getUTCDate());
Posted by: Guest on May-14-2020

Code answers related to "how to get only month and year in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language