Sometimes you need to convert dates that come from forms or other input options that you have no
control over. For example,
you may receive a date as : 1-Dec-1970'.
One way to go is to use the date() and strtotime() functions :
Thomas Miranda wrote :1017
To say the truth, there is a more easy way, that is to explode and after implode the variable that holds the data. example:
$var_data = date("Y-m-d");
$data = implode(`/`, array_reverse(explode(`-`, $var_data)));
A big brazilian hugs :)
hope it help.
can we create a function with this? if yes, send to my email please, i was trying but not sucess with the return.
Strong Yuan wrote :1019
mysql_query("select date_format(cr_date,\"$Y-d-m\")as date...
Strong Yuan wrote :1020
mysql_query("select date_format(cr_date,\"%Y-%d-%m\")as date...