rename column name in sql server
EXEC sp_RENAME 'TableName.OldColumnName' , 'NewColumnName' , 'COLUMN'
Format
|
Code
|
Short date pattern (d)
|
DateTime.Now.ToString("d")
|
Long date pattern (D)
|
DateTime.Now.ToString("D")
|
Full date/time pattern - short time (f)
|
DateTime.Now.ToString("f")
|
Full date/time pattern - long time (F)
|
DateTime.Now.ToString("F")
|
General date/time pattern - short time (g)
|
DateTime.Now.ToString("g")
|
General date/time pattern - long time (G)
|
DateTime.Now.ToString("G")
|
Month/day pattern (M)
|
DateTime.Now.ToString("M")
|
Round-trip date/time pattern (O)
|
DateTime.Now.ToString("O")
|
RFC 1123 pattern (R)
|
DateTime.Now.ToString("R")
|
Sortable date/time pattern (s)
|
DateTime.Now.ToString("s")
|
Short time pattern (t)
|
DateTime.Now.ToString("t")
|
Long time pattern (T)
|
DateTime.Now.ToString("T")
|
Universal sortable date/time pattern (u)
|
DateTime.Now.ToString("u")
|
Universal full date/time pattern (U)
|
DateTime.Now.ToString("U")
|
Year/month pattern (Y)
|
DateTime.Now.ToString("Y")
|
Output
|
11/8/2010
|
Monday, November 08, 2010
|
Monday, November 08, 2010 3:39 PM
|
Monday, November 08, 2010 3:39:46 PM
|
11/8/2010 3:39 PM
|
11/8/2010 3:39:46 PM
|
November 08
|
2010-11-08T15:39:46.4804000-08:00
|
Mon, 08 Nov 2010 15:39:46 GMT
|
2010-11-08T15:39:46
|
3:39 PM
|
3:39:46 PM
|
2010-11-08 15:39:46Z
|
Monday, November 08, 2010 11:39:46 PM
|
November, 2010
|
Comments
Post a Comment