Date as Null

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jay

    #1

    Date as Null

    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

  • Herfried K. Wagner [MVP]

    #2
    Re: Date as Null

    "Jay" <jayasunderam@g mail.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/>

    Comment

    • Cor Ligthert [MVP]

      #3
      Re: Date as Null

      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" <jayasunderam@g mail.comschreef in bericht
      news:1159388080 .269270.173860@ k70g2000cwa.goo glegroups.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
      >

      Comment

      • Jay

        #4
        Re: Date as Null

        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" <jayasunderam@g mail.comschreef in bericht
        news:1159388080 .269270.173860@ k70g2000cwa.goo glegroups.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

        Comment

        Working...