In PHP, how does one format the time read from mssql2000? In mssql2000, the value of a field in the table is 2008-9-2013: 02: 01php. after reading this field, it is displayed as: 2008 & nbsp; I want php to still display it after reading it: 2008-9-what can I do? ------ Solution ------------------ first method: how to format the time read from mssql2000 in php PHP?
The field value of the table in mssql2000 is: 13:02:01
After php reads this, it is shown as: 2008 September 20 13:02
I want php to display it as: 13:02:01
What can I do?
------ Solution --------------------
Method 1: define ini_set ("mssql. datetimeconvert", "0") at the beginning of the php document ″);
Method 2: modify php. ini and find; mssql. datetimeconvert = On. remove the semicolon and change on to off. restart apache.
; Specify how datetime and datetim4 columns are returned
; On => Returns data converted to SQL server settings
; Off => Returns values as YYYY-MM-DD hh: mm: ss
; Mssql. datetimeconvert = On