1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do I put today's date on my web page?

Discussion in 'General Marketing' started by zyan_08, Sep 21, 2008.

  1. #1
    hey guys, Im a newbie & this is my questions,

    How do I put today's date on my web page?
    So that the date updates automatically

    please help me:(
     
    zyan_08, Sep 21, 2008 IP
  2. c0ldMax

    c0ldMax Banned

    Messages:
    777
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    via php: <?php print(date("1 F d, Y")); ?>
     
    c0ldMax, Sep 21, 2008 IP
  3. zyan_08

    zyan_08 Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    im using html editor,where should i place the code?
     
    zyan_08, Sep 21, 2008 IP
  4. snowbird

    snowbird Notable Member

    Messages:
    3,036
    Likes Received:
    395
    Best Answers:
    0
    Trophy Points:
    290
    #4
    snowbird, Sep 21, 2008 IP
  5. zyan_08

    zyan_08 Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ok, thanks a lots snowbird, I found it,

    my problem solved hurray!!!! :D
     
    zyan_08, Sep 21, 2008 IP
  6. 073165

    073165 Active Member

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #6
    I find using Javascript the easiest. Just paste this anywhere in your PHP or HTML page(s) and it works like a champ. Best of luck. Michael

    <SCRIPT LANGUAGE=JavaScript><!-- Begin
    var months=new Array(13);
    months[1]="January";
    months[2]="February";
    months[3]="March";
    months[4]="April";
    months[5]="May";
    months[6]="June";
    months[7]="July";
    months[8]="August";
    months[9]="September";
    months[10]="October";
    months[11]="November";
    months[12]="December";
    var time=new Date();
    var lmonth=months[time.getMonth() + 1];
    var date=time.getDate();
    var year=time.getYear();
    if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year="19" + year;
    if (navigator.appName == "Netscape")
    year=1900 + year;
    document.write("<left>" + lmonth + " ");
    document.write(date + ", " + year + "</left>");
    // End --></SCRIPT>
     
    073165, Sep 21, 2008 IP
  7. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    818
    Best Answers:
    7
    Trophy Points:
    320
    #7
    Be aware that Javascript, or any other method that polls the user's computer for date information, will only return the date information as is set for that computer. In other words, if that information is incorrect, the resulting date you polled for will also be incorrect.

    As long as you don't necessarily need correct information you will have no problems. However, if it is critical that the date information be correct, you must get the date information from a reliable source - Never from the user's computer.
     
    mmerlinn, Sep 21, 2008 IP
  8. richboyjosh

    richboyjosh Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    arent there auto calenders? like hit counters...idk
     
    richboyjosh, Sep 22, 2008 IP
  9. tankard

    tankard Well-Known Member

    Messages:
    1,018
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    185
    #9
    Why the heck? Do you think I dunno today's date? Then I'm probably too tipsy :D
    Why would you load your website with excess code? What is the point of having a date?
     
    tankard, Sep 22, 2008 IP