Thread: Date variable?
View Single Post
Old 12-03-2005, 05:38 AM   #3 (permalink)
boohlick
Webmaster Guru
 
Join Date: Aug 2005
Posts: 401
Default

or you can try this

Quote:
<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('UTC');


// Prints something like: Monday
echo date("l");

// Prints something like: Monday 15th of August 2005 03:12:46 PM
echo date('l dS \of F Y h:i:s A');

// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));

/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
echo date(date::RFC822);

// prints something like: 2000-07-01T00:00:00+0000
echo date(date::ATOM, mktime(0, 0, 0, 7, 1, 2000));
?>
boohlick is offline   Reply With Quote
Sponsored Links