Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9314045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:02:05+00:00 2026-06-19T02:02:05+00:00

I am using following code to display date on my webpage. I need to

  • 0

I am using following code to display date on my webpage. I need to update it every minute. How to do that?

var d=new Date();
var n=d.toString();
document.write(n);

Currently its static, means when the page load, datetime of that moment is displayed. I have to update time every minutes without refreshing the page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T02:02:07+00:00Added an answer on June 19, 2026 at 2:02 am

    I am using following approach:

    var myVar=setInterval(function(){myDateTimer()},60000);
    
                function makeArray() 
                {
                    for (i = 0; i<makeArray.arguments.length; i++)
                    this[i + 1] = makeArray.arguments[i];
                }
    
                function myDateTimer()
                {
                    var months = new makeArray('January','February','March','April','May',
                    'June','July','August','September','October','November','December');
                    var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
                    var date = new Date();
                    var day = date.getDate();
                    var month = date.getMonth() + 1;
                    var yy = date.getYear();
                    var year = (yy < 1000) ? yy + 1900 : yy;
                    var hours = date.getHours();
                    var minutes = date.getMinutes();
                    var finaldate = days[ date.getDay() ] + ", " + months[month] + " " + day + ", " + year + " " + hours +" : " + minutes;
                    document.getElementById("showDateTime").innerHTML=finaldate;
                }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I using following code: var search = 'test'; if ($('#sku').find(search) ){ //alert(search); $(document).find(search).css('color','red'); <TABLE>
I am using following code to display date and time: String currentDateTime =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime()); textViewDay.setText(currentDateTime);
I am using the following code to display the date in the front-end screen:
I'm using the following code to display an arabic date: Dim dtFormat As DateTimeFormatInfo
I am using the following code to display an index for a TableView. My
Using the following code, I am able to display up to 10 images. What
I am using the following code on my site to display a thumbnail produced
I am using the following code to try and display in a time in
I have the following code to display an image in imagebox using EmgucV: Capture
The textbook I'm using to learn JavaScript uses the following code to display an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.