判断字符串是否为时间格式

 DateTime dtTemp;
 string strTemp="2012-12-12";
 bool isDate= DateTime.TryParse("strTemp",out dtTemp);
posted @ 2012-12-27 13:40  yellowshorts  阅读(1188)  评论(0编辑  收藏  举报