日期:2014-05-17 浏览次数:20489 次
SELECT * FROM P_BBXXB where substring(pxtime,12,10) > getdate()
------解决方案--------------------
/// <summary>
///
/// </summary>
/// <param name="str">要截取的字符串</param>
/// <param name="start">开头</param>
/// <param name="last">结束</param>
/// <returns></returns>
public static string yuan(string str, string start, string last)
{
if (str.ToLower().IndexOf(start.ToLower()) >= 0)
{
str = str.Substring(str.ToLower().IndexOf(start.ToLower()) + start.Length, str.Length - str.ToLower().IndexOf(start.ToLower()) - start.Length); str = str.Substring(0, str.ToLower().IndexOf(last.ToLower()));
return str;
}
else
{
return str = "";
}
}
yuan.("2010-12-04~2010-12-13","2","~");
这就截取出2010-12-13