存档
convert函数的style截止到ASE15.0.3有以下的样式!
Date format conversions using the style parameter
Without century (yy) |
With century (yyyy) |
Standard |
Output |
- |
0 or 100 |
Default |
mon dd yyyy hh:mm AM (or PM) |
1 |
101 |
USA |
mm/dd/yy |
2 |
2 |
SQL standard |
yy.mm.dd |
3 |
103 |
English/French |
dd/mm/yy |
4 |
104 |
German |
dd.mm.yy |
5 |
105 |
dd-mm-yy |
|
6 |
106 |
dd mon yy |
|
7 |
107 |
mon dd, yy |
|
8 |
108 |
HH:mm:ss |
|
- |
9 or 109 |
Default + milliseconds |
mon dd yyyy hh:mm:ss AM (or PM) |
10 |
110 |
USA |
mm-dd-yy |
11 |
111 |
Japan |
yy/mm/dd |
12 |
112 |
ISO |
yymmdd |
13 |
113 |
yy/dd/mm |
|
14 |
114 |
mm/yy/dd |
|
14 |
114 |
hh:mi:ss:mmmAM(or PM) |
|
15 |
115 |
dd/yy/mm |
|
- |
16 or 116 |
mon dd yyyy HH:mm:ss |
|
17 |
117 |
hh:mmAM |
|
18 |
118 |
HH:mm |
|
19 |
hh:mm:ss:zzzAM |
||
20 |
hh:mm:ss:zzz |
||
21 |
yy/mm/dd HH:mm:ss |
||
22 |
yy/mm/dd HH:mm AM (or PM) |
||
23 |
yyyy-mm-ddTHH:mm:ss |
更新:2021-09-23
ASE 16.0 SP02 新增日期时间样式:
Without century (yy) |
With century (yyyy) |
Standard |
Output |
36 | 136 |
<hh:mm:ss.zzzzzz>AM (PM) |
|
37 | 137 |
<hh:mm.ss.zzzzzz> | |
38 |
138 |
<mon dd yyyy hh:mm:ss.zzzzzz>AM (PM) | |
39 |
139 |
<mon dd yyyy hh:mm:ss.zzzzzz> | |
40 |
140 |
<yyyy-mm-dd hh:mm:ss.zzzzzz> |