{{theTime}}

Search This Blog

Total Pageviews

Java Script to display Current date and time Example

<!DOCTYPE html>
<html>
<head>
<script>
function showDateTime() {
    var today = new Date();
    var hour = today.getHours();
    var minute = today.getMinutes();
    var second = today.getSeconds();
    minute = checkTime(minute);
    second = checkTime(second);
    document.getElementById('datetime').innerHTML =
    hour + " : " + minute  + " : " + second;
    var time= setTimeout(startTime, 500);
}
function checkTime(i) {
    if (i < 10) {i = "0" + i};  
    return i;
}
</script>
</head>

<body onload="showDateTime()">

<div id="datetime"></div>

</body>
</html>

No comments:

Generate Models from SQL Server using Entity Framework Core

To generate models from SQL Server database tables using Entity Framework (EF) in .NET, you can follow the Database-First approach with Ent...