top of page
Anchor 1
Last Updated on :
Friday, 28 January 2022
Display Current Date and Time in WIX Website

Now Displaying Automated date and time in WIX Website's are as easy as it is so in this tutorial we'll learn learn how to make simple text work as updated/live date and time.\
Video Tutorial:
Live Example: Automatic Date & Time | Demos by Tanishq Sundhan
Code Used:
$w.onReady(function () {
// TODO: write your page related code here...
automaticTime();
});
function automaticTime(){
const today = new Date();
const options = {
day: "numeric",
month: "short",
year: "numeric"
};
$w("#currentDate").text = today.toLocaleDateString("en-GB", options);
$w("#currentTime").text = today.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" , second : "2-digit"});
setTimeout(automaticTime,1000);
}
bottom of page