Re: String to Date and Date to String Functions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux