I read my database using DataReader.
and some row does not have fdate value.
so when I Convert the null date to DateTime then Error occurs.
How can I check the field empty or not?
AdsCommand cmd = conn.CreateCommand();
cmd.CommandText = "select name,fdate from abc";
AdsDataReader reader = cmd.ExecuteReader();
DateTime flsdate = (reader["fdate"].Equals(null))? Convert.ToDateTime(reader["fdate"]) : DateTime.Today;
I tried with Equals, but it does not work.
anybody know how to check the null object to avoid convert error?
Thank you!