Subject Re: [firebird-php] How to set default date format ?
Author Milan Babuskov
hamacker wrote:
> Here we use date format different from USA (MM-DD-YYYY), we use european
> date format as DAY-MONTH-YEAR.
>
> In PHP every time that I use date fields, I have to complex replace "/"
> with ".", like this :
> $my_european_date=str_replace("/",".",$HTTP_POST_VARS["date_var_mm-dd-yyy"])
> ;

You can use date() and strtotime() functions like this:

echo date('d.m.Y', strtotime($datevar));

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org