标签:
SELECT CONVERT(varchar(100), GETDATE(), 0) 05 9 2011 9:12AM
SELECT CONVERT(varchar(100), GETDATE(), 1) 05/09/11
SELECT CONVERT(varchar(100), GETDATE(), 2) 11.05.09
SELECT CONVERT(varchar(100), GETDATE(), 3) 09/05/11
SELECT CONVERT(varchar(100), GETDATE(), 4) 09.05.11
SELECT CONVERT(varchar(100), GETDATE(), 5) 09-05-11
SELECT CONVERT(varchar(100), GETDATE(), 6) 09 05 11
SELECT CONVERT(varchar(100), GETDATE(), 7) 05 09, 11
SELECT CONVERT(varchar(100), GETDATE(), 8) 09:13:14
SELECT CONVERT(varchar(100), GETDATE(), 9) 05 9 2011 9:13:14:670AM
SELECT CONVERT(varchar(100), GETDATE(), 10) 05-09-11
SELECT CONVERT(varchar(100), GETDATE(), 11) 11/05/09
SELECT CONVERT(varchar(100), GETDATE(), 12) 110509
SELECT CONVERT(varchar(100), GETDATE(), 13) 09 05 2011 09:13:14:670
SELECT CONVERT(varchar(100), GETDATE(), 14) 09:13:14:670
SELECT CONVERT(varchar(100), GETDATE(), 20) 2011-05-09 09:13:14
SELECT CONVERT(varchar(100), GETDATE(), 21) 2011-05-09 09:13:14.670
SELECT CONVERT(varchar(100), GETDATE(), 22) 05/09/11 9:15:33 AM
SELECT CONVERT(varchar(100), GETDATE(), 23) 2011-05-09
SELECT CONVERT(varchar(100), GETDATE(), 24) 09:15:33
SELECT CONVERT(varchar(100), GETDATE(), 25) 2011-05-09 09:15:33.140
SELECT CONVERT(varchar(100), GETDATE(), 100) 05 9 2011 9:15AM
SELECT CONVERT(varchar(100), GETDATE(), 101) 05/09/2011
SELECT CONVERT(varchar(100), GETDATE(), 102) 2011.05.09
SELECT CONVERT(varchar(100), GETDATE(), 103) 09/05/2011
SELECT CONVERT(varchar(100), GETDATE(), 104) 09.05.2011
SELECT CONVERT(varchar(100), GETDATE(), 105) 09-05-2011
SELECT CONVERT(varchar(100), GETDATE(), 106) 09 05 2011
SELECT CONVERT(varchar(100), GETDATE(), 107) 05 09, 2011
SELECT CONVERT(varchar(100), GETDATE(), 108) 09:16:38
SELECT CONVERT(varchar(100), GETDATE(), 109) 05 9 2011 9:16:38:543AM
SELECT CONVERT(varchar(100), GETDATE(), 110) 05-09-2011
SELECT CONVERT(varchar(100), GETDATE(), 111) 2011/05/09
SELECT CONVERT(varchar(100), GETDATE(), 112) 20110509
SELECT CONVERT(varchar(100), GETDATE(), 113) 09 05 2011 09:17:19:857
SELECT CONVERT(varchar(100), GETDATE(), 114) 09:17:19:857
SELECT CONVERT(varchar(100), GETDATE(), 120) 2011-05-09 09:17:19
SELECT CONVERT(varchar(100), GETDATE(), 121) 2011-05-09 09:17:19.857
SELECT CONVERT(varchar(100), GETDATE(), 126) 2011-05-09T09:17:19.857
SELECT CONVERT(varchar(100), GETDATE(), 130) 6 ????? ??????? 1432 9:17:19:857AM
SELECT CONVERT(varchar(100), GETDATE(), 131) 6/06/1432 9:17:19:857AM
//截取时间为月日的部分
select
stuff(
CONVERT
(
varchar
(12), getdate(), 111),1,5)
RIGHT
(
CONVERT
(
VARCHAR
(10),GETDATE(),120),5)
SELECT
RIGHT
(
CONVERT
(
varchar
(12), getdate(), 111) ,5)
select
stuff(
CONVERT
(
varchar
(12), getdate(), 111),1,5,
‘‘
)
substring
(
CONVERT
(
varchar
(12), getdate(), 111),6,len(getdate())-5)
标签:
原文地址:http://www.cnblogs.com/shangwd/p/5630645.html