473,395 Members | 1,986 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 4570
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dominique Javet | last post by:
Hello, I'm new to php and mysql and I use Dreamweaver MX 2004, so sorry for this "newbie" question... I've found no answer in the forum ... I've a date problem with my formular. In my mysql DB...
2
by: zaceti | last post by:
I'm new to MySQL and I am having a problem selecting the highest valued date/time for a particular day. Here is the table structure: ...
9
by: Thomas R. Hummel | last post by:
Hello, I am importing data that lists rates for particular coverages for a particular period of time. Unfortunately, the data source isn't very clean. I've come up with some rules that I think...
30
by: Dr John Stockton | last post by:
It has appeared that ancient sources give a method for Numeric Date Validation that involves numerous tests to determine month length; versions are often posted by incomers here. That sort of code...
4
by: Stewart Allen | last post by:
I'm trying to filter a table that has 2 date fields, the first date will always have a value but the second will only occasionally has a value. Each date field also has a corresponding text field...
1
by: Ken | last post by:
I wrote a function to use in queries that takes a date and adds or subtracts a certain length time and then returns the new value. There are times when my function needs to return Null values. ...
7
by: Nimmy | last post by:
Hi, I have a file which has different dates, I want to scanf them as CHAR and convert them to DATE format, how can I do this? Thanks
4
by: Rethish | last post by:
Hi All, I am developing an application in VB.net. I am using .Net Datetime picker control to manage the date. But I am not able to assign null/Empty value to the control. I found the property...
12
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
9
by: ice | last post by:
Hello, I have a couple of tables. The client tables and the contacted tables. I am not sure how to start on this, what I need is a way to query all my clients then show any client that the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.