Sometimes we will get the situation where we must insert NULL into datetime column in sql server.
Follow these steps to do that:
1) First Include the namespace:
using System.Data.SqlTypes;
2) Declare
System.Data.SqlTypes.SqlDateTime getDate;
getDate = SqlDateTime.Null;
3) Insert using command Parameters
cmd11.Parameters.AddWithValue(“@encashed_date”, getDate);
——————————<>—————————————
thx a million..was really looking for this ..thx a lot.
really thx on me . i was searching for long time
thank you it worked a loot for me . pls can you suggest topics in asp where to concentrate i am fresher and i search of job
Great job dude..
i tried this, but still getting error. 😦
thx for your help gerat job . it solved my problem