Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
How to Declare Null value in Datetime
sai vital
8y
346
1
Reply
if (date2 == "")
{
date2 = null;
}
DateTime dates2 = DateTime.ParseExact(date2, "dd-MM-yyyy H:mm", CultureInfo.InvariantCulture);
by using this code i got an Error 'String reference not set to an instance of a String.'.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Dropdown inside listview, insert button passing null to db?
gridview textbox validation