Forums

[resolved] Is there a quick code to insert a floating date? (3 posts)

  1. ssc001
    Member
    Posted 3 years ago #

    I would like to write a page that always displays today's date in the body of the page. So when somebody visits the page, it would say, for example:

    From: The Desk of Dan
    Dallas Texas
    Date: [today's date]

    And no matter what day the visitor visits the page, it would always display the current date.

    Any ideas for the proper code to do this, or a plugin? I can't seem to find a function for exactly this need. Thanks!

  2. Otto
    Tech Ninja
    Posted 3 years ago #

    <?php echo date('F j'); ?>

    See here for other ways to format the date:
    http://php.net/date

  3. ssc001
    Member
    Posted 3 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.