What will you call this???
-
Then the format is changed too.
-
Assume that pTimeText is containing 2 dates seperated by space. Like pTimeText = "31/12/2008 15:36 29/12/2008 15:36"
this.txtTime.Text = Convert.ToDateTime(pTimeText.Substring(0, pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime) + Environment.NewLine + Convert.ToDateTime(pTimeText.Substring(pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime);
Guess what will above code return. I found it in a file.
Ahsan Ullah Senior Software Engineer
-
Assume that pTimeText is containing 2 dates seperated by space. Like pTimeText = "31/12/2008 15:36 29/12/2008 15:36"
this.txtTime.Text = Convert.ToDateTime(pTimeText.Substring(0, pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime) + Environment.NewLine + Convert.ToDateTime(pTimeText.Substring(pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime);
Guess what will above code return. I found it in a file.
Ahsan Ullah Senior Software Engineer
*points and laughs* Pointless. Really. The DateTime class can can convert a string to date. Separating the both dates must be done manually, but the conversion can be done by the DateTime class.