Re: Date format from file

From: Date: Wed, 05 Feb 2003 17:27:53 +0000
Subject: Re: Date format from file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134443@lists.php.net to get a copy of this message
Hi, Thursday, February 6, 2003, 2:41:42 AM, you wrote: ehhc> Is it possible to read a string from a text file (i.e. ehhc> 0502031130) and be able to use that in a date function such as: ehhc> $date = date("dmyHi", strtotime('+28 days)); ehhc> How would I use that string as the date in the above code? ehhc> TIA, ehhc> Ed If you change the format of your string you can do this: $t = "20030205 1530"; echo 'New date/time = '.date("d/m/Y H:i",strtotime($t." + 28 days")).'<br>'; -- regards, Tom

« previous php.general (#134443) next »