you might be inserting this into a DataBase which is not a correct approach, its better you do it in your DB itself.
Create a method or extension
string ReplaceFirstOccurenceofCharacter(string text, string search, string replace)
{
int pos = text.IndexOf(search);
if (pos < 0)
{
return text;
}
return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
}
and call the method
string sdatevalue = "2014-02-12";
string stime = "9.00 A.M";
string concatinatedstring = string.Format("{0} {1}", sdatevalue, stime);
var result = ReplaceFirstOccurenceofCharacter(concatinatedstring, ".", ":");
Actual code is pulled from This link Hope it helps you.