I am trying to get a date to display with just the Month Day and Year. The code does not return any error. But the result on the site still shows the same - Wed Jan 10 2018 00:00:00 GMT+0400 (Arabian Standard Time)
What could I be missing?
const oldDate = $w("#text49").text;
const newDate = oldDate.split(' ').splice(1, 3).join(' ');
$w('#text49').text = newDate;