基本整型数格式化计划
Specifier
Type
Format
Input
Output
c
Currency
{ 0:c}
250.25
$250.25
-250.25
-$250.25
d
Decimal (whole number)
{ 0:d}
250
250
-250
-250
http://czbdfyjy.999ask.com/,滁州白癜风医院哪家好 e
Scientific
{ 0:e}
3.14
3.140000e+000
-3.14
-3.140000e+000
f
Fixed point
{ 0:f}
3.14
3.14
-3.14
-3.14
g
General
{ 0:g}
3.14
3.14
-3.14
-3.14
n
Number with commas for thousands
{ 0:n}
25000
25,000
-25000
-25,000
p
Percent
{ 0:p}
.25
25.00%
{ 0,2:p}
.25555
25.56%
X
Uppercase hexadecimal
{ 0:X}
15
F
x
Lowercase hexadecimal
{ 0:x}
15
F
Custom Integer FormattingSpecifier
Type
Format
Input
Output
0
Zero placeholder
{ 0:00.0000}
3.14
3.1400
#
Digit placeholder
{ 0:(#).##}
3.14
(3).14
.
Decimal point
{ 0:0.0}
3.14
3.1
,
Thousand separator
{ 0:0,0}
2500.25
2,500
,.
Number scaling
{ 0:0,.}
2000
2
(Note: Scales by 1000)
%
Percent
{ 0:0%}
25
2500%
Multiplies by 100 and adds percent sign
;
Group separator
{Positive-Format};{ Negative-Format} ;{Zero-format}
Basic Date FormattingSpecifier
Description
Format
Result Using w
d
Short date
{ 0:d}
4/17/2004
D
Long date
{ 0:D}
April 17, 2004
t
Short time
{ 0:t}
11:50 AM
T
Long time
{ 0:T}
11:50:30: AM
f
Full date and time
{ 0:f}
April 17, 2004 11:51 AM
F
Long full date and time
{ 0:F}
April 17, 2004 11:51:45 AM
g
Default date and time
{ 0:g}
4/17/2004 11:53 AM
G
Long default date and time
{ 0:G}
4/17/2004 11:53:45 AM
M or m
Month day
{ 0:M}
April 17
R or r
RFC1123 date string
{ 0:r}
Sat, 17 Apr 2004 11:55:17 GMT
s
Sortable date string
ISO 8601
{ 0:s}
T11:56:22
u
Universal sortable date pattern
{ 0:u}
11:58:11Z
U
Universal sortable full date pattern
{ 0:U}
Saturday, April 17, 2004 3:58:32 PM
Y or y
Year month pattern
{ 0:Y}
April, 2004
Custom Date FormattingSpecifier
Description
Format
d
Displays the day of the week as a number
{ 0:d}
dd
Displays the day of the month as a leading zero integer
{ 0:dd}
ddd
Displays the abbreviated day of the week
{ 0:ddd}
dddd
Displays the full name of the day of the week
{ 0:dddd}
f,ff,fff,ffff...
Displays seconds fractions in one or more digits
{ 0:f} or { 0:ff}
g or gg
Displays the era, such as B.C. or A.D.
{ 0:g}
h
Displays the hour from 112
{ 0:h}
hh
Displays the hour from 112 with leading zero
{ 0:hh}
H
Displays the hour in military format 023
{ 0:H}
HH
Displays the hour in military format 023 with leading zero for single-digit hours
{ 0:HH}
m
Displays the minute as an integer
{ 0:m}
mm
Displays the minute as an integer with leading zero for single-digit minute values
{ 0:mm}
M
Displays the month as an integer
{ 0:M}
MM
Displays the month as an integer with leading zero for single-digit month values
{ 0:MM}
MMM
Displays the abbreviated month name
{ 0:MMM}
MMMM
Displays the full name of the month
{ 0:MMMM}
s
Displays the seconds as a integer
{ 0:s}
ss
Displays the seconds as an integer with a leading zero for single-digit second values
{ 0:ss}
t
Displays the first character of A.M. or P.M.
{ 0:t}
tt
Displays the full A.M. or P.M.
{ 0:tt}
y
Displays two-digit year, with no preceding 0 for values 09.
{ 0:y}
yy
Displays two-digit year
{ 0:yy}
yyyy
Displays four-digit year
{ 0:yyyy}
zz
Displays the time zone offset
{ 0:zz}
:
Time separator
{ 0:hh:mm:tt}
/
Date separator
{ 0:MM/dd/yyyy}
Trackback:
重庆治疗妇科习惯性流产费用哈尔滨治疗前列腺炎费用
积食消化不良怎么办
- 华杰专硕第四届大湾区MBA名校大联展在深圳圆满举办!
- 哈佛代理校长2022年毕业演讲:带着激情和热情去拥抱未知世界!
- 投资者提问:你好,请问截止6年末30日公司股东户数是多少?谢谢
- 高圆圆拍写真女儿来探班,两人亲密拥抱画面甜蜜有爱,未见赵又廷
- 日本7月5日新增确诊病症3万6189例 东京都增长一倍
- 重庆第二批集中供地:保亿总价30.8亿摘北碚、渝北两区共约480亩地
- 腌咸鸭蛋,别用盐水泡,厨师长教你20年方法,咸香新鲜,流油起沙
- 27岁女主持人在医院去世,男友称原定在今年婚后、其母已患抑郁症
- 合肥出让5宗西南角共揽金超26亿元 肥东城乡建投摘得3宗
- 投资者提问:上半年业绩MV什么时候出来
- 埃弗拉:13岁遭性虐待曾让我羞耻,去意大利业余球队能吃饱是最美回忆
- 驱逐舰05到底香不香? 来看看真实用户是如何评价的