DateTime is null

M

Mark

I have a variable of type DateTime. It's captured off a asp.net web form,
and the date field on the form is optional. However, you can't create an
instance of DateTime and assign it a value of null. I realize I could
capture the date as a string from the textbox, and then check to see if the
string is empty and parse when necessary, but this kind of seems like a hack
when there is a DateTime type available.

Suggestions?

Thanks in advance.
Mark
 
K

Kevin Spencer

You're doing it right, Mark.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top