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);
 }

Logo_edited.png
Disclaimer

Our free and premium content is non-exclusive, meaning you are not the only one with access to the content. You can customize our content to fit your end product. Redistribution of our content is strictly prohibited. This means you cannot make our content available to others as-is, stand-alone products, or stock products in ANY LANGUAGE, regardless if you offer our content for free or not.

© 2025 WixCodable.com | All Rights Reserved

bottom of page