Is Valid Date - CSharp System

CSharp examples for System:DateTime Parse

Description

Is Valid Date

Demo Code


using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.Web.Security;
using System.Web;
using System.Configuration;
using System.Data;
using System;//w w  w . j av a 2  s  .c o m

public class Main{
        public static bool IsValidDate(String date)
      {
         DateTime Temp;
         if (DateTime.TryParse(date, out Temp) == true)
            return true;
         else
            return false;
      }
}

Related Tutorials