手机
当前位置:查字典教程网 >编程开发 >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调用三种数据库的方法(2)

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

PHP基于MySQL数据库实现对象持久层的方法

循环table转换成div

4.与数据库的连接

PHP 判断数组是否为空的5大方法

隐性调用php程序的方法

数据库相关问题

php数据库连接

精品推荐
分类导航