Re: String to Date and Date to String Functions?
| From: | Rick Fletcher | Date: | Tue, 25 Jan 2005 01:23:23 +0000 |
| Subject: | Re: String to Date and Date to String Functions? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207192@lists.php.net to get a copy of this message | ||
Ben Edwards wrote:
The format I am interested in is DD-MM-YYYY which is the way dates are specified in the UK, strtodate() cant handle this.Ben, there is no (built in) string->timestamp function that takes a format. strtotime() is pretty smart about interpreting your input, but it's limited to the GNU date input formats: http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html The topmost comment on the strtotime() manual page (http://us2.php.net/manual/en/function.strtotime.php) describes the function you're looking for, and links to it: http://www.evilwalrus.com/viewcode.php?codeEx=627 --Rick