判断字符串格式的时间

时间:2014-12-19 15:43:41
【文件属性】:
文件名称:判断字符串格式的时间
文件大小:358B
文件格式:TXT
更新时间:2014-12-19 15:43:41
字符串格式 时间 //判断字符串格式的时间是否符合要求 public int IsDate(string strDate) { System.Text.RegularExpressions.Regex strReg = new System.Text.RegularExpressions.Regex(@"\d{4}-\d{1,2}-\d{1,2}"); if (strReg.IsMatch(strDate)) { return 1; } else { return 0; } }

网友评论