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 ?, Method 1: how to format the time read from mssql2000 in p 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
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.