Getting and formating todays date...

From: Date: Fri, 09 Jun 2000 15:01:30 +0000
Subject: Getting and formating todays date...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1397@lists.php.net to get a copy of this message
Hello all, I know I am close, but maybe a little far .... I need a variable to be todays date in format like 20000609. I also need to set another variable be 30 days from now, hence 20000709. I am doing the following: <?php $todaysdate = mktime (0,0,0,date("m") ,date("d") ,date("Y")); $thirtydays = mktime (0,0,0,date("m")+1,date("d") ,date("Y")); echo strftime ("Todays Date: $todaysdate<br>"); echo ("Expiration : $thirtydays<br>"); ?> But it's returning the number of seconds since UNIX epoch (i think...). Am I missing a function to get it in to the format I need it in? Thanks all!! -Graham. graham@tridia.com .

« previous php.general (#1397) next »