SQL 2008R2 日期转换
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84 |
--SQL CONVERT日期转换 print GETDATE() --相同 Select CONVERT ( varchar (100), GETDATE(), 0) AS
NDateTime --: 05 16 2006 10:57AM Select CONVERT ( varchar (100), GETDATE(), 100) AS
NDateTime --: 05 16 2006 10:57AM --年份2或者4位 Select CONVERT ( varchar (100), GETDATE(), 1) AS
NDateTime --: 05/16/06 Select CONVERT ( varchar (100), GETDATE(), 101) AS
NDateTime --: 05/16/2006 --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 2) AS
NDateTime --: 06.05.16 Select
CONVERT ( varchar (100), GETDATE(), 102) AS
NDateTime --: 2006.05.16 --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 3) AS
NDateTime --: 16/05/06 Select
CONVERT ( varchar (100), GETDATE(), 103) AS
NDateTime --: 16/05/2006 --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 4) AS
NDateTime --: 16.05.06 Select
CONVERT ( varchar (100), GETDATE(), 104) AS
NDateTime --: 16.05.2006 --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 5) AS
NDateTime --: 16-05-06 Select
CONVERT ( varchar (100), GETDATE(), 105) AS
NDateTime --: 16-05-2006 --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 6) AS
NDateTime --: 16 05 06 Select
CONVERT ( varchar (100), GETDATE(), 106) AS
NDateTime --: 16 05 2006 --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 7) AS
NDateTime --: 05 16, 06 Select
CONVERT ( varchar (100), GETDATE(), 107) AS
NDateTime --: 05 16, 2006 --相同 Select
CONVERT ( varchar (100), GETDATE(), 8) AS
NDateTime --: 10:57:46 Select
CONVERT ( varchar (100), GETDATE(), 108) AS
NDateTime --: 10:57:49 Select
CONVERT ( varchar (100), GETDATE(), 24) AS
NDateTime --: 10:57:47 --相同 Select
CONVERT ( varchar (100), GETDATE(), 9) AS
NDateTime --: 05 16 2006 10:57:46:827AM Select
CONVERT ( varchar (100), GETDATE(), 109) AS
NDateTime --: 05 16 2006 10:57:49:437AM --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 10) AS
NDateTime --: 05-16-06 Select
CONVERT ( varchar (100), GETDATE(), 110) AS
NDateTime --: 05-16-2006 --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 11) AS
NDateTime --: 06/05/16 Select
CONVERT ( varchar (100), GETDATE(), 111) AS
NDateTime --: 2006/05/16 --年份2或者4位 Select
CONVERT ( varchar (100), GETDATE(), 12) AS
NDateTime --: 060516 Select
CONVERT ( varchar (100), GETDATE(), 112) AS
NDateTime --: 20060516 --相同 Select
CONVERT ( varchar (100), GETDATE(), 13) AS
NDateTime --: 16 05 2006 10:57:46:937 Select
CONVERT ( varchar (100), GETDATE(), 113) AS
NDateTime --: 16 05 2006 10:57:49:513 --相同 Select
CONVERT ( varchar (100), GETDATE(), 14) AS
NDateTime --: 10:57:46:967 Select
CONVERT ( varchar (100), GETDATE(), 114) AS
NDateTime --: 10:57:49:547 --相同 Select
CONVERT ( varchar (100), GETDATE(), 20) AS
NDateTime --: 2006-05-16 10:57:47 Select
CONVERT ( varchar (100), GETDATE(), 120) AS
NDateTime --: 2006-05-16 10:57:49 --相同 Select
CONVERT ( varchar (100), GETDATE(), 21) AS
NDateTime --: 2006-05-16 10:57:47.157 Select
CONVERT ( varchar (100), GETDATE(), 121) AS
NDateTime --: 2006-05-16 10:57:49.700 Select
CONVERT ( varchar (100), GETDATE(), 25) AS
NDateTime --: 2006-05-16 10:57:47.250 --相似 Select
CONVERT ( varchar (100), GETDATE(), 126) AS
NDateTime --: 2006-05-16T10:57:49.827 Select
CONVERT ( varchar (100), GETDATE(), 22) AS
NDateTime --: 05/16/06 10:57:47 AM --常用 Select
CONVERT ( varchar (100), GETDATE(), 23) AS
NDateTime --: 2006-05-16 Select
CONVERT ( varchar (100), GETDATE(), 130) AS
NDateTime --: 18 ???? ?????? 1427 10:57:49:907AM Select
CONVERT ( varchar (100), GETDATE(), 131) AS
NDateTime --: 18/04/1427 10:57:49:920AM |
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。