Re: uk date to mysql date and back again

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

 



2007. 04. 10, kedd keltezéssel 15.59-kor Ross ezt írta:
> I have made a very messy function for this that splits the string up does 
> all kinds of stuff but I was wondering if anyone has a 1 or 2 line function 
> for gettting a uk date
> 
> dd/mm/yyyy (it is a string)to mysql version YYYY-MM-DD

what about doing it like

$dateparts = explode('/', $ukdate);
$sqldate = implode('-', array_reverse($dateparts));

greets
Zoltán Németh

> 
> and then back again.
> 
> ta,
> 
> R.
> 

-- 
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