in c#
you can use
Convert.ToDateTime(txtDate.Text)
with in a try - catch statement
if error then you can blank textbox
try
{
txtDt.Text = Convert.ToDateTime(txtDt.Text).ToString("dd-MMM-yyyy");
}
catch (Exception eee)
{
txtDt.Text = "";
}
if (txtDt.Text.Trim() == "")
{
ClientScript.RegisterStartupScript(GetType(), ClientID, "alert('Enter Valid Date');", true);
return;
}