PHP中怎么格式化从mssql2000中读取的时间

WBOY
Release: 2016-06-13 13:42:23
Original
903 people have browsed it

PHP中如何格式化从mssql2000中读取的时间?
mssql2000中表的一个字段值为:2008-9-20 13:02:01
php读取这个之后显示为:2008 九月 20 13:02 
我想让php读取后仍然显示为:2008-9-20 13:02:01
请问怎么处理?


------解决方案--------------------
第一个方法:php文档开头定义ini_set(”mssql.datetimeconvert”,”0″);
第二个方法:修改php.ini,找到;mssql.datetimeconvert = On ,去掉前面的分号,修改on为off,重启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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!