Wednesday, September 30, 2009

GetDateFormat Method

Example: string sdate = dt.GetDateTimeFormats()[3]; // mm/dd/yyyy

(0) 9/1/2003
(1) 9/1/03
(2) 09/01/03
(3) 09/01/2003
(4) 03/09/01
(5) 2003-09-01
(6) 01-Sep-03
(7) Monday, September 01, 2003
(8) September 01, 2003
(9) Monday, 01 September, 2003
(10) 01 September, 2003
(11) Monday, September 01, 2003 12:00 AM
(12) Monday, September 01, 2003 12:00 AM
(13) Monday, September 01, 2003 0:00
(14) Monday, September 01, 2003 00:00
(15) September 01, 2003 12:00 AM
(16) September 01, 2003 12:00 AM
(17) September 01, 2003 0:00
(18) September 01, 2003 00:00
(19) Monday, 01 September, 2003 12:00 AM
(20) Monday, 01 September, 2003 12:00 AM
(21) Monday, 01 September, 2003 0:00
(22) Monday, 01 September, 2003 00:00
(23) 01 September, 2003 12:00 AM
(24) 01 September, 2003 12:00 AM
(25) 01 September, 2003 0:00
(26) 01 September, 2003 00:00
(27) Monday, September 01, 2003 12:00:00 AM
(28) Monday, September 01, 2003 12:00:00 AM
(29) Monday, September 01, 2003 0:00:00
(30) Monday, September 01, 2003 00:00:00
(31) September 01, 2003 12:00:00 AM
(32) September 01, 2003 12:00:00 AM
(33) September 01, 2003 0:00:00
(34) September 01, 2003 00:00:00
(35) Monday, 01 September, 2003 12:00:00 AM
(36) Monday, 01 September, 2003 12:00:00 AM
(37) Monday, 01 September, 2003 0:00:00
(38) Monday, 01 September, 2003 00:00:00
(39) 01 September, 2003 12:00:00 AM
(40) 01 September, 2003 12:00:00 AM
(41) 01 September, 2003 0:00:00
(42) 01 September, 2003 00:00:00
(43) 9/1/2003 12:00 AM
(44) 9/1/2003 12:00 AM
(45) 9/1/2003 0:00
(46) 9/1/2003 00:00
(47) 9/1/03 12:00 AM
(48) 9/1/03 12:00 AM
(49) 9/1/03 0:00
(50) 9/1/03 00:00
(51) 09/01/03 12:00 AM
(52) 09/01/03 12:00 AM
(53) 09/01/03 0:00
(54) 09/01/03 00:00
(55) 09/01/2003 12:00 AM
(56) 09/01/2003 12:00 AM
(57) 09/01/2003 0:00
(58) 09/01/2003 00:00
(59) 03/09/01 12:00 AM
(60) 03/09/01 12:00 AM
(61) 03/09/01 0:00
(62) 03/09/01 00:00
(63) 2003-09-01 12:00 AM
(64) 2003-09-01 12:00 AM
(65) 2003-09-01 0:00
(66) 2003-09-01 00:00
(67) 01-Sep-03 12:00 AM
(68) 01-Sep-03 12:00 AM
(69) 01-Sep-03 0:00
(70) 01-Sep-03 00:00
(71) 9/1/2003 12:00:00 AM
(72) 9/1/2003 12:00:00 AM
(73) 9/1/2003 0:00:00
(74) 9/1/2003 00:00:00
(75) 9/1/03 12:00:00 AM
(76) 9/1/03 12:00:00 AM
(77) 9/1/03 0:00:00
(78) 9/1/03 00:00:00
(79) 09/01/03 12:00:00 AM
(80) 09/01/03 12:00:00 AM
(81) 09/01/03 0:00:00
(82) 09/01/03 00:00:00
(83) 09/01/2003 12:00:00 AM
(84) 09/01/2003 12:00:00 AM
(85) 09/01/2003 0:00:00
(86) 09/01/2003 00:00:00
(87) 03/09/01 12:00:00 AM
(88) 03/09/01 12:00:00 AM
(89) 03/09/01 0:00:00
(90) 03/09/01 00:00:00
(91) 2003-09-01 12:00:00 AM
(92) 2003-09-01 12:00:00 AM
(93) 2003-09-01 0:00:00
(94) 2003-09-01 00:00:00
(95) 01-Sep-03 12:00:00 AM
(96) 01-Sep-03 12:00:00 AM
(97) 01-Sep-03 0:00:00
(98) 01-Sep-03 00:00:00
(99) September 01
(100) September 01
(101) Mon, 01 Sep 2003 00:00:00 GMT
(102) Mon, 01 Sep 2003 00:00:00 GMT
(103) 2003-09-01T00:00:00
(104) 12:00 AM
(105) 12:00 AM
(106) 0:00
(107) 00:00
(108) 12:00:00 AM
(109) 12:00:00 AM
(110) 0:00:00
(111) 00:00:00
(112) 2003-09-01 00:00:00Z
(113) Monday, September 01, 2003 4:00:00 AM
(114) Monday, September 01, 2003 04:00:00 AM
(115) Monday, September 01, 2003 4:00:00
(116) Monday, September 01, 2003 04:00:00
(117) September 01, 2003 4:00:00 AM
(118) September 01, 2003 04:00:00 AM
(119) September 01, 2003 4:00:00
(120) September 01, 2003 04:00:00
(121) Monday, 01 September, 2003 4:00:00 AM
(122) Monday, 01 September, 2003 04:00:00 AM
(123) Monday, 01 September, 2003 4:00:00
(124) Monday, 01 September, 2003 04:00:00
(125) 01 September, 2003 4:00:00 AM
(126) 01 September, 2003 04:00:00 AM
(127) 01 September, 2003 4:00:00
(128) 01 September, 2003 04:00:00
(129) September, 2003
(130) September, 2003


Here are the results of en-GB - (english, Great Britain) formats:

(0) 01/09/2003
(1) 01/09/03
(2) 1/9/03
(3) 1.9.03
(4) 2003-09-01
(5) 01 September 2003
(6) 1 September 2003
(7) 01 September 2003 00:00
(8) 01 September 2003 0:00
(9) 01 September 2003 12:00 AM
(10) 01 September 2003 12:00 AM
(11) 1 September 2003 00:00
(12) 1 September 2003 0:00
(13) 1 September 2003 12:00 AM
(14) 1 September 2003 12:00 AM
(15) 01 September 2003 00:00:00
(16) 01 September 2003 0:00:00
(17) 01 September 2003 12:00:00 AM
(18) 01 September 2003 12:00:00 AM
(19) 1 September 2003 00:00:00
(20) 1 September 2003 0:00:00
(21) 1 September 2003 12:00:00 AM
(22) 1 September 2003 12:00:00 AM
(23) 01/09/2003 00:00
(24) 01/09/2003 0:00
(25) 01/09/2003 12:00 AM
(26) 01/09/2003 12:00 AM
(27) 01/09/03 00:00
(28) 01/09/03 0:00
(29) 01/09/03 12:00 AM
(30) 01/09/03 12:00 AM
(31) 1/9/03 00:00
(32) 1/9/03 0:00
(33) 1/9/03 12:00 AM
(34) 1/9/03 12:00 AM
(35) 1.9.03 00:00
(36) 1.9.03 0:00
(37) 1.9.03 12:00 AM
(38) 1.9.03 12:00 AM
(39) 2003-09-01 00:00
(40) 2003-09-01 0:00
(41) 2003-09-01 12:00 AM
(42) 2003-09-01 12:00 AM
(43) 01/09/2003 00:00:00
(44) 01/09/2003 0:00:00
(45) 01/09/2003 12:00:00 AM
(46) 01/09/2003 12:00:00 AM
(47) 01/09/03 00:00:00
(48) 01/09/03 0:00:00
(49) 01/09/03 12:00:00 AM
(50) 01/09/03 12:00:00 AM
(51) 1/9/03 00:00:00
(52) 1/9/03 0:00:00
(53) 1/9/03 12:00:00 AM
(54) 1/9/03 12:00:00 AM
(55) 1.9.03 00:00:00
(56) 1.9.03 0:00:00
(57) 1.9.03 12:00:00 AM
(58) 1.9.03 12:00:00 AM
(59) 2003-09-01 00:00:00
(60) 2003-09-01 0:00:00
(61) 2003-09-01 12:00:00 AM
(62) 2003-09-01 12:00:00 AM
(63) 01 September
(64) 01 September
(65) Mon, 01 Sep 2003 00:00:00 GMT
(66) Mon, 01 Sep 2003 00:00:00 GMT
(67) 2003-09-01T00:00:00
(68) 00:00
(69) 0:00
(70) 12:00 AM
(71) 12:00 AM
(72) 00:00:00
(73) 0:00:00
(74) 12:00:00 AM
(75) 12:00:00 AM
(76) 2003-09-01 00:00:00Z
(77) 01 September 2003 04:00:00
(78) 01 September 2003 4:00:00
(79) 01 September 2003 04:00:00 AM
(80) 01 September 2003 4:00:00 AM
(81) 1 September 2003 04:00:00
(82) 1 September 2003 4:00:00
(83) 1 September 2003 04:00:00 AM
(84) 1 September 2003 4:00:00 AM
(85) September 2003
(86) September 2003

Thursday, September 10, 2009

Iterate through SeverVariable in ASP.net

public string ServerVariables()
{

System.Collections.Specialized.NameValueCollection oValues =
new System.Collections.Specialized.NameValueCollection();
oValues = Request.ServerVariables;
for(int i=0; i < oValues.Count ; i++)
{
value += string.Format("Key {0} - Text {1}", oValues.Keys[i].ToString(), oValues.Get(i).ToString());
}


return value;
}
 
Locations of visitors to this page