Show Date and Time
Published on: 2005-08-14 - Views: 34660
Displaying Date and Time is possible and very easy thanks to PHP date() function; let's see how it works:
1- <?php date("Y-m-d"); ?>
2- <?php date("D M j G:i:s T Y"); ?>
3- <?php date("H:i:s"); ?>
4- <?php date("F j, Y, g:i a"); ?>
Your output will be:
2- <?php date("D M j G:i:s T Y"); ?>
3- <?php date("H:i:s"); ?>
4- <?php date("F j, Y, g:i a"); ?>
1- 2006-09-09
2- Sat Sep 9 4:13:18 CDT 2006
3- 04:13:18
4- September 9, 2006, 4:13 am
These are only a few exmaples of what you can do with it.2- Sat Sep 9 4:13:18 CDT 2006
3- 04:13:18
4- September 9, 2006, 4:13 am
There are really lots of ways that you can customize your data format, go here to browse all the formats you can obtain with the date() PHP function.
You can obviously use this function even for other purposes..for example you can store the date into a variable and use it into a MySQL query or in any other way.
Rank higher than your competitors.
Are you getting enough traffic?
Make your website stand out from the crowd, reach the top positions in search engines.
Visit High Quality Links now!
Are you getting enough traffic?
Make your website stand out from the crowd, reach the top positions in search engines.
Visit High Quality Links now!




