Request help writing script code

.

Is it possible to have a JavaScript code that shows me the date on the label when opening an application without the Internet and it changes automatically?

yes, possible

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <script>
        function sendDateTime() {
            var now = new Date();
            var dateTimeString = now.toLocaleString(); // Get formatted date and time
            window.AppInventor.setWebViewString(dateTimeString); // Send to Kodular
        }
        setInterval(sendDateTime, 1000); // Update every second
    </script>
</head>
<body onload="sendDateTime()">
</body>
</html>

2 Likes

Why not just using the Clock component?
Taifun

I forgot because I left a while and found code from artificial intelligence thanks to all

Didnt the above one help you? What is the script you used in your app?