|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Date as NullHi ,
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 "Jay" <jayasunde***@gmail.com> schrieb: Some approaches (the article is in German but the samples are in VB.NET):> 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". <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/> 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/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatetimeclassdatetopic.asp I hope this helps, Cor Show quoteHide quote "Jay" <jayasunde***@gmail.com> schreef in bericht news:1159388080.269270.173860@k70g2000cwa.googlegroups.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 > thanks for the info
Cor Ligthert [MVP] wrote: Show quoteHide quote > 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/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatetimeclassdatetopic.asp > > I hope this helps, > > Cor > > > "Jay" <jayasunde***@gmail.com> schreef in bericht > news:1159388080.269270.173860@k70g2000cwa.googlegroups.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 > >
Bug in Datagrids
XML to save some settings overflow detection without try-catch Finding a control on a form with a text reference filter dataTable/datagridview to show top 1 row for duplicate IDs? Permanent Rectangle on Form. VB Program - CHM help integration Are you a C# Developer in Buckinghamshire? DirectX and Sound Getting nodes from an XML-document |
|||||||||||||||||||||||