分类:
2009-07-09 13:35:14
|
(注意:此標籤格式是固定的,與你自定的樣板名稱無關喔)
至於日期的格式碼請參照下表,紅字部分便是我有用到的。
String |
Meaning |
d |
Day of month as digits with no leading zero for single-digit days. |
dd |
Day of month as digits with leading zero for single-digit days. |
ddd |
Day of week as a three-letter abbreviation. |
dddd |
Day of week as its full name. |
M |
Month as digits with no leading zero for single-digit months. |
MM |
Month as digits with leading zero for single-digit months. |
MMM |
Month as a three-letter abbreviation. |
MMMM |
Month as its full name. |
y |
Year as last two digits, but with no leading zero for years less than 10. |
yy |
Year as last two digits, but with leading zero for years less than 10. |
yyyy |
Year represented by full four digits. |
另外時間的格式碼語法如下
[TIME_USER]hh:mm[TIME_USER_END]始 -> 12:33始
[TIME_USER]hh:mm[TIME_USER_END]止 -> 01:10止
時間的格式碼由標籤[DATE_USER]…[DATE_USER_END]包住,
同上,在標籤外愛放啥文字隨便你。
在Define Template的視窗設定完後,
按下快速鍵[Alt]+[自訂樣板的序號]便可插入自訂的時間格式,
時間的格式碼請參照下表,紅字部分是我有用到的。
String |
Meaning |
h |
Hours with no leading zero for single-digit hours; 12-hour clock |
hh |
Hours with leading zero for single-digit hours; 12-hour clock |
H |
Hours with no leading zero for single-digit hours; 24-hour clock |
HH |
Hours with leading zero for single-digit hours; 24-hour clock |
m |
Minutes with no leading zero for single-digit minutes |
mm |
Minutes with leading zero for single-digit minutes |
s |
Seconds with no leading zero for single-digit seconds |
ss |
Seconds with leading zero for single-digit seconds |
t |
One character time marker string, such as A or P |
tt |
Multicharacter time marker string, such as AM or PM |