468,242 Members | 1,685 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,242 developers. It's quick & easy.

Date as Null

Jay
Hi ,
I am trying to assign a NULL value to a date (datatype). I am using VB
NET 2003. I know that date cannot be assigned a null value in 2003. I
cannot change the datatype as I am submitting the data to a web service
and it accepts only date (datatype). I dont want to display 01/01/0001
on the screen. I want to leave the date field as "blank".
Are there any suggestions to work around this problem.

thanks
Jay

Sep 27 '06 #1
3 4339
"Jay" <ja**********@gmail.comschrieb:
I am trying to assign a NULL value to a date (datatype). I am using VB
NET 2003. I know that date cannot be assigned a null value in 2003. I
cannot change the datatype as I am submitting the data to a web service
and it accepts only date (datatype). I dont want to display 01/01/0001
on the screen. I want to leave the date field as "blank".
Some approaches (the article is in German but the samples are in VB.NET):

<URL:http://dotnet.mvps.org/dotnet/articles/nullabledates/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Sep 27 '06 #2
Jay,

In VB.Net the term Null exist only for database values.

However I assume you don't mean that. To represent the date element of a
datetime structure you can use

myDateTime.Date
http://msdn.microsoft.com/library/de...sdatetopic.asp

I hope this helps,

Cor
"Jay" <ja**********@gmail.comschreef in bericht
news:11**********************@k70g2000cwa.googlegr oups.com...
Hi ,
I am trying to assign a NULL value to a date (datatype). I am using VB
NET 2003. I know that date cannot be assigned a null value in 2003. I
cannot change the datatype as I am submitting the data to a web service
and it accepts only date (datatype). I dont want to display 01/01/0001
on the screen. I want to leave the date field as "blank".
Are there any suggestions to work around this problem.

thanks
Jay

Sep 28 '06 #3
Jay
thanks for the info
Cor Ligthert [MVP] wrote:
Jay,

In VB.Net the term Null exist only for database values.

However I assume you don't mean that. To represent the date element of a
datetime structure you can use

myDateTime.Date
http://msdn.microsoft.com/library/de...sdatetopic.asp

I hope this helps,

Cor
"Jay" <ja**********@gmail.comschreef in bericht
news:11**********************@k70g2000cwa.googlegr oups.com...
Hi ,
I am trying to assign a NULL value to a date (datatype). I am using VB
NET 2003. I know that date cannot be assigned a null value in 2003. I
cannot change the datatype as I am submitting the data to a web service
and it accepts only date (datatype). I dont want to display 01/01/0001
on the screen. I want to leave the date field as "blank".
Are there any suggestions to work around this problem.

thanks
Jay
Sep 29 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Dominique Javet | last post: by
2 posts views Thread by zaceti | last post: by
9 posts views Thread by Thomas R. Hummel | last post: by
30 posts views Thread by Dr John Stockton | last post: by
4 posts views Thread by Stewart Allen | last post: by
7 posts views Thread by Nimmy | last post: by
4 posts views Thread by Rethish | last post: by
12 posts views Thread by Assimalyst | last post: by
9 posts views Thread by ice | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.