您的位置:首页 > 数据库

SQL日期类型数据转换CONVERT

2009-05-20 09:17 465 查看
SQL code
1Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
2Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06
3Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16
4Select CONVERT(varchar(100), GETDATE(), 3): 16/05/06
5Select CONVERT(varchar(100), GETDATE(), 4): 16.05.06
6Select CONVERT(varchar(100), GETDATE(), 5): 16-05-06
7Select CONVERT(varchar(100), GETDATE(), 6): 16 05 06
8Select CONVERT(varchar(100), GETDATE(), 7): 05 16, 06
9Select CONVERT(varchar(100), GETDATE(), 8): 10:57:46
10Select CONVERT(varchar(100), GETDATE(), 9): 05 16 2006 10:57:46:827AM
11Select CONVERT(varchar(100), GETDATE(), 10): 05-16-06
12Select CONVERT(varchar(100), GETDATE(), 11): 06/05/16
13Select CONVERT(varchar(100), GETDATE(), 12): 060516
14Select CONVERT(varchar(100), GETDATE(), 13): 16 05 2006 10:57:46:937
15Select CONVERT(varchar(100), GETDATE(), 14): 10:57:46:967
16Select CONVERT(varchar(100), GETDATE(), 20): 2006-05-16 10:57:47
17Select CONVERT(varchar(100), GETDATE(), 21): 2006-05-16 10:57:47.157
18Select CONVERT(varchar(100), GETDATE(), 22): 05/16/06 10:57:47 AM
19Select CONVERT(varchar(100), GETDATE(), 23): 2006-05-16
20Select CONVERT(varchar(100), GETDATE(), 24): 10:57:47
21Select CONVERT(varchar(100), GETDATE(), 25): 2006-05-16 10:57:47.250
22Select CONVERT(varchar(100), GETDATE(), 100): 05 16 2006 10:57AM
23Select CONVERT(varchar(100), GETDATE(), 101): 05/16/2006
24Select CONVERT(varchar(100), GETDATE(), 102): 2006.05.16
25Select CONVERT(varchar(100), GETDATE(), 103): 16/05/2006
26Select CONVERT(varchar(100), GETDATE(), 104): 16.05.2006
27Select CONVERT(varchar(100), GETDATE(), 105): 16-05-2006
28Select CONVERT(varchar(100), GETDATE(), 106): 16 05 2006
29Select CONVERT(varchar(100), GETDATE(), 107): 05 16, 2006
30Select CONVERT(varchar(100), GETDATE(), 108): 10:57:49
31Select CONVERT(varchar(100), GETDATE(), 109): 05 16 2006 10:57:49:437AM
32Select CONVERT(varchar(100), GETDATE(), 110): 05-16-2006
33Select CONVERT(varchar(100), GETDATE(), 111): 2006/05/16
34Select CONVERT(varchar(100), GETDATE(), 112): 20060516
35Select CONVERT(varchar(100), GETDATE(), 113): 16 05 2006 10:57:49:513
36Select CONVERT(varchar(100), GETDATE(), 114): 10:57:49:547
37Select CONVERT(varchar(100), GETDATE(), 120): 2006-05-16 10:57:49
38Select CONVERT(varchar(100), GETDATE(), 121): 2006-05-16 10:57:49.700
39Select CONVERT(varchar(100), GETDATE(), 126): 2006-05-16T10:57:49.827
40Select CONVERT(varchar(100), GETDATE(), 130): 18 ???? ?????? 1427 10:57:49:907AM
41Select CONVERT(varchar(100), GETDATE(), 131): 18/04/1427 10:57:49:920AM
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sql