how to get only month and year in js
let dateObj = new Date();
let myDate = (dateObj.getUTCFullYear()) + "/" + (dateObj.getMonth() + 1)+ "/" + (dateObj.getUTCDate());
how to get only month and year in js
let dateObj = new Date();
let myDate = (dateObj.getUTCFullYear()) + "/" + (dateObj.getMonth() + 1)+ "/" + (dateObj.getUTCDate());
date javascript only show day month year
const event = new Date('2021-09-07');
const options = { year: 'numeric', month: 'long' };
console.log(event.toLocaleDateString('de-DE', options));
// expected output: September 2021
console.log(event.toLocaleDateString('ja-JP', options));
// expected output: 2021年9月
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us