Download our free eBook!

Learn how to dominate your market with a website that drives more traffic and converts more sales.


our free eBook!

Dominate your market with a website that attracts more visitors, converts more enquiries and generates sales.


Voodoochilli Blog

Introduction to PHP Date

11th of January 2007

I thought for this blog item I would write about something fairly simple, that should help a lot of people. PHP has a very useful built in function simply called date(). Guess what it does? That’s right it returns the current date, but it can be used with other functions to do much more.

Here is a very simple example of its usage:

echo date(“F j, Y, g:i a”);

This will print out the today’s date in this format:

Month, Day, Year, Hour, Minutes and AM or PM

If you simply wanted to show the time and not the full date you would use:

echo date(“g:i a”);

For a more detail on using the PHP date() function visit www.php.net/date

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • About Us

    We are Voodoochilli Design Ltd - the place to go for Hereford web design

    We have been designing and building websites for over 10 years and have worked with a wide range of businesses from start-ups to multi-billion pound internationals and everything in between.

    If you are interested in finding out more, check out our full website.

  • Recent Posts

  • Awards, Associations & Media

    Go to