验证日期格式代码

public bool IsDate(string str)
        
{
            
try
            
{
                DateTime.Parse(str);
                
return true;
            }

            
catch (Exception e)
            
{
                
return false;
            }

        }
posted @ 2014-08-05 18:12  Jakin.zhou  阅读(142)  评论(0编辑  收藏  举报