"where opertime>'06-12-12 12:12:12'"
将此字符串中'06-12-12 12:12:12'改成"yo_date('06-12-12 12:12:12',''''')"的字符串模式

解决方案 »

  1.   

    不知道这样是否符合楼主的要求!string s1 = "06-12-12 12:12:12";
    string s2 = "";
    string s3 = string.Format("yo_date('{0}',{1})",s1,s2);
      

  2.   

    我的意思是从原来的“where opertime>'06-12-12 12:12:12' and .....”中找出时间段
    '06-12-12 12:12:12'然后再将其换成"to_date(''06-12-12 12:12:12'',....)"
      

  3.   

    Regex reg=new Regex(@"((\d\-){2}\d{2})\s((\d:){2}\d{2})");
    string output=reg.Replace(input,"$3 $1")
      

  4.   

    不是这种意思吧,我的意思是原来已经有一个含有日期的那个位置,然后再用replace换了他
      

  5.   

    string s = "where opertime>'06-12-12 12:12:12' and .....";
    s = s.Split('\'')[1].ToString();//s就是你需要提取的内容