1
I am running the following code:
$sql= mssql_query("select getdate()");
$res = mssql_fetch_assoc($sql);
and he’s returning me the following date:
2015-04-10 32767:06
The time is five digits, someone knows why?
ps. I have already amended the directive of php.ini
for: mssql.datetimeconvert = Off
Have you tried date(’d-M-Y', strtotime($datadobanco)); ?
– user28595
Yes. but I need to set this in the PHP configuration because there are many querys with this problem.
– Hugo Fumero
It’s almost the same problem as that question: Problems to convert data mon dd yyyy hh:mm and uses the same API
mssql_*
.– rray
You need the time?
– Jean Gustavo Prates
date('Y-m-d H:i:s', strtotime($databanco);
– anderson seibert