Numerical / Date Format

Abstract: Numerical / Date Format


Numerical formatting ##################### #######################

int N=90;

Decimal zero padding N.ToString ( "D3")

Currency ToString ( "C")

Scientific notation ToString ( "E")

Numerical ToString ( "N")

Reserve 0 ToString ( "00000")

Reserve value ToString ( "###. #")

Percentage ToString ( "##%")

The ToString plus or minus zero ( "positive; negative; zero")

####################### date formatting #####################

Short date ToString ( "d") complete date ToString ( "D")

Short time ToString ( "t") full time ToString ( "T")  

Sun and Moon mode ToString ( "M") date mode ToString ( "Y")

ToString ( "tt") display am / pm

Original: Large column  values / date formatting


Guess you like

Origin www.cnblogs.com/chinatrump/p/11458488.html