C#字符串替换 例如:把字符串01/05/2009 - 01/11/2009改成2009/01/05- 2009/01/11 把年放在前面 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string str = "01/05/2009 - 01/11/2009"; string patternstr = @"(\d+)/(\d+)/(\d+)"; str = Regex.Replace(str, patternstr, "$3/$2/$1"); Response.Write(str); string from = "01/05/2009 - 01/11/2009"; string fromnew = from.Substring(6, 4) + '/' + from.Substring(3, 2) + '/' + from.Substring(0, 2); string to = from.Substring(13, 10); string tonew = to.Substring(6, 4) + '/' + to.Substring(3, 2) + '/' + to.Substring(0, 2); list[i].InnerText = fromnew + "-" + tonew; string from = "01/05/2009 - 01/11/2009"; string fromnew = from.Substring(6, 4) + '/' + from.Substring(3, 2) + '/' + from.Substring(0, 2); string to = from.Substring(13, 10); string tonew = to.Substring(6, 4) + '/' + to.Substring(3, 2) + '/' + to.Substring(0, 2); string newString = fromnew + "-"+tonew; string from = "01/05/2009 - 01/11/2009"; string fromnew = from.Substring(6, 4) + '/' + from.Substring(0, 5) ; string to = from.Substring(13, 10); string tonew = to.Substring(6, 4) + '/' + to.Substring(0, 5) ; string newString = fromnew + "-" + tonew; Console.WriteLine(newString); .net 2.0的winform程序能调用服务器上的exe程序吗 C#接口中的契约编程,看得不是很懂,请懂的的的高手分别解释下,谢谢了 接口调用实现问题,求大家帮忙 谁可以告诉我。WndProc与DefWndProc函数的差别和作用??? C# .NET 的问题,帮忙啊 请教一个问题:怎样向一个数据库中插入大量的数据? sharpmap的名空间引用问题 各位大侠,知道如何做一个多列显示,且有字段名的combobox吗? 请问Socket编程的问题 如何将数据局中的数据导入到datagridview 求救 C# 执行Oracle存储过程的简单问题 sql语法解析 提取其中的表名,列名。
string patternstr = @"(\d+)/(\d+)/(\d+)";
str = Regex.Replace(str, patternstr, "$3/$2/$1");
Response.Write(str);
string fromnew = from.Substring(6, 4) + '/' + from.Substring(3, 2) + '/' + from.Substring(0, 2);
string to = from.Substring(13, 10);
string tonew = to.Substring(6, 4) + '/' + to.Substring(3, 2) + '/' + to.Substring(0, 2);
list[i].InnerText = fromnew + "-" + tonew;
string fromnew = from.Substring(6, 4) + '/' + from.Substring(3, 2) + '/' + from.Substring(0, 2);
string to = from.Substring(13, 10);
string tonew = to.Substring(6, 4) + '/' + to.Substring(3, 2) + '/' + to.Substring(0, 2);
string newString = fromnew + "-"+tonew;
string fromnew = from.Substring(6, 4) + '/' + from.Substring(0, 5) ;
string to = from.Substring(13, 10);
string tonew = to.Substring(6, 4) + '/' + to.Substring(0, 5) ;
string newString = fromnew + "-" + tonew;
Console.WriteLine(newString);