Results 1 to 12 of 12

Thread: Adding date to website
      
   

  1. #1
    dew
    dew is offline Master Sergeant
    Join Date
    Apr 2008
    Posts
    63

    Question Adding date to website

    Im creating a website (not yet published) & I want to add today's date (automatically updating). How do I do this?

    Main website is www.galwoliecottage.com but new one has no domain yet! Hope you can still help.

    Denise

  2. #2
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,353

    Default Re: Adding date to website

    Try dynamicdrive.com for a date/time script

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  3. #3
    dew
    dew is offline Master Sergeant
    Join Date
    Apr 2008
    Posts
    63

    Default Re: Adding date to website

    thanks Karen, but theres nothing on it just for date,as far as I can see.

    Denise

  4. #4
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,721

    Default Re: Adding date to website

    Hi, you can paste this below into a html box.

    <script language="JavaScript">
    <!--
    var now = new Date();
    var days = new Array(
    'Sun','Mon','Tues',
    'Wednes','Thurs','Fri','Sat');
    var months = new Array(
    'Jan','Feb','Mar','Apr','May',
    'June','July','Aug','Sept','Oct',
    'Nov','Dec');
    var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
    function fourdigits(number) {
    return (number < 1000) ? number + 1900 : number;}
    today = days[now.getDay()] + ", " +
    months[now.getMonth()] + " " +
    date + ", " +
    (fourdigits(now.getYear()));
    document.write(today);
    //-->
    </script>

  5. #5
    dew
    dew is offline Master Sergeant
    Join Date
    Apr 2008
    Posts
    63

    Default Re: Adding date to website

    CHris, when I paste that into my HTML box, and then go to preview it, the date box doesnt appear. Am I missing something?

    Denise

  6. #6
    Bethers's Avatar
    Bethers is offline Major General & Forum Moderator
    Join Date
    Feb 2006
    Posts
    5,232

    Default Re: Adding date to website

    Your computer is blocking it from being shown in preview. You're probably getting a notice on top of the screen that some content is blocked - click on that to allow that content and it will show. Or just publish :)

  7. #7
    dew
    dew is offline Master Sergeant
    Join Date
    Apr 2008
    Posts
    63

    Default Re: Adding date to website

    Bethers - THanks, thats great! Its my husbands site and hes working on domain name, etc at the moment so cant publish yet. He wants to know now, can the font be changed for that html code?

  8. #8
    Bethers's Avatar
    Bethers is offline Major General & Forum Moderator
    Join Date
    Feb 2006
    Posts
    5,232

    Default Re: Adding date to website

    The way that code is written, it's using the default font chosen for your page. If you want a different font just for that code, yes it can be done, but you'll need to add it to the code using the following:

    Before the code put:

    <FONT style="FONT-SIZE:10pt" color="#FFFFFF" face="Georgia">

    change the size and color and face to whatever you want.

    After the code put:

    </FONT>

  9. #9
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,353

    Default Re: Adding date to website

    Theres a ton of them on dynamic drive

    http://dynamicdrive.com/dynamicindex6/index.html

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  10. #10
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,721

    Default Re: Adding date to website

    Quote Originally Posted by Karen Mac View Post
    Theres a ton of them on dynamic drive

    http://dynamicdrive.com/dynamicindex6/index.html

    Karen
    Hi Karen, don't think there is a date only script on this site. which is strange

  11. #11
    valwilson is offline Sergeant Major
    Join Date
    Jul 2008
    Posts
    86

    Default Re: Adding date to website

    Hi Beth,
    that worked perfectly! Thanks for your help.

    Denise

  12. #12
    Bethers's Avatar
    Bethers is offline Major General & Forum Moderator
    Join Date
    Feb 2006
    Posts
    5,232

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49