Cast of DBNull
Hi , I got a problem in formatting of date
when i try to do the following,
if(c.Value.GetType() != typeof(DBNull))
{
DateTime dt = DateTime.Parse(c.Value.ToString());
c.Value = dt.ToString("dd/MM/yyyy");
}
It says "Object cannot be cast from DBNull to other types"
what i have to do ...
pls help me soon as possible guys.
thank u
Andrzej WegierskiPosted Mar 1, 2005, 6:45 AM
sdnaffiPosted Feb 28, 2005, 10:09 PM
rencelsPosted Feb 28, 2005, 8:21 AM