By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 2,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

DateTimePicker and Null Values

P: n/a
Hello all:

Does anyone happen to know the best way to handle null values for
DateTimePickers? We have quite a few columns in our db that will not
necissarily have a date for certain entries. How do you allow for this?
I have tried to send a null string to the dataset but it requires a
value type of DateTime.

Thanks,

- John -
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
VJ
You have to have some a value like 1/1/1900 or something & treat it as
null...in your code.. Thats what we have done..

VJ

"John Smith" <oh******@hotmail.com> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl...
Hello all:

Does anyone happen to know the best way to handle null values for
DateTimePickers? We have quite a few columns in our db that will not
necissarily have a date for certain entries. How do you allow for this? I
have tried to send a null string to the dataset but it requires a value
type of DateTime.

Thanks,

- John -

Nov 17 '05 #2

P: n/a
If you're using Visual Studio, open up Server Explorer and navigate to the
table. Right-click on the table and select "Design Table". you will then
see a design view of your table with a column called "Allow nulls". Put a
check in the box for the date column and that should solve your problem...
hopefully.

cashdeskmac

"John Smith" wrote:
Hello all:

Does anyone happen to know the best way to handle null values for
DateTimePickers? We have quite a few columns in our db that will not
necissarily have a date for certain entries. How do you allow for this?
I have tried to send a null string to the dataset but it requires a
value type of DateTime.

Thanks,

- John -

Nov 17 '05 #3

P: n/a
On Thu, 24 Mar 2005 15:56:14 -0800, John Smith wrote:
Hello all:

Does anyone happen to know the best way to handle null values for
DateTimePickers? We have quite a few columns in our db that will not
necissarily have a date for certain entries. How do you allow for this?
I have tried to send a null string to the dataset but it requires a
value type of DateTime.

Thanks,

- John -


Have a look at this control from Alexander Shirshov:
http://www.omnitalented.com/Blog/Per...070934dc8.aspx

It extends the DateTimePcker control with nullabel functionality and it's
open source.

--
Claudio Grazioli
http://www.grazioli.ch
Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.