G
Guest
How do I insert a null date into sql 2000? I tried this:
DateTime expireDate = (txtExpDate.Text.Trim().Length <= 0) ?
DateTime.MinValue : DateTime.Parse(txtExpDate.Text);
and
DateTime expireDate = (txtExpDate.Text.Trim().Length <= 0) ? null :
DateTime.Parse(txtExpDate.Text);
it doesn't accept nulls for DateTime, and the MinValue is not null.
Can anyone help please?
DateTime expireDate = (txtExpDate.Text.Trim().Length <= 0) ?
DateTime.MinValue : DateTime.Parse(txtExpDate.Text);
and
DateTime expireDate = (txtExpDate.Text.Trim().Length <= 0) ? null :
DateTime.Parse(txtExpDate.Text);
it doesn't accept nulls for DateTime, and the MinValue is not null.
Can anyone help please?