How can I get only date and time separately using tolocalestring with date in javaScript.
function update_time_zone_2() { let timezone = time_zones_2.options[time_zones_2.selectedIndex].value; let date_and_time = new Date().toLocaleString("en-US", { timeZone: "Africa/Abidjan", timeStyle: "medium", hourCycle: "h12" }); console.log(date_and_time); document.getElementById('time_2').innerHTML = date_and_time; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)