手机
当前位置:查字典教程网 >编程开发 >php教程 >数据库的日期格式转换
数据库的日期格式转换
摘要:只要在convert中指定日期格式的代号就够了,如:selectconvert(char(20),getdate(),101)selecte...

只要在convert中指定日期格式的代号就够了,如:

select convert(char(20),getdate(),101)

select emp_id,convert(char(20),hire_dt,101) from employee

-----------------------------------------------------

日期格式代号

-------------------- -----------

04/05/2000101

-------------------- -----------

2000.04.05102

-------------------- -----------

05/04/2000103

-------------------- -----------

05.04.2000104

-------------------- -----------

05-04-2000105

-------------------- -----------

05 Apr 2000106

-------------------- -----------

Apr 05, 2000107

-------------------- -----------

11:33:24108

-------------------- -----------

Apr 5 2000 11:33:24109

-------------------- -----------

04-05-2000110

-------------------- -----------

2000/04/05111

-------------------- -----------

20000405112

【数据库的日期格式转换】相关文章:

无数据库的详细域名查询程序PHP版(3)

PHP调用三种数据库的方法(3)

新版PHP极大的增强功能和性能

无数据库的详细域名查询程序PHP版(5)

循环table转换成div

无数据库的详细域名查询程序PHP版(1)

用PHP调用数据库的存贮过程

论坛头像随机变换代码

无数据库的详细域名查询程序PHP版(4)

PHP数据库开发知多少

精品推荐
分类导航