HowTo check if Date is empty (#12.00.00 AM#) ???

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default HowTo check if Date is empty (#12.00.00 AM#) ???

    Hello,
    I have this

    Dim myDate As Date

    ...
    ...
    How can I check if this date is empty (value #12.00.00 AM# is in there) ?

    Thanks,
    Andreas


    Andreas Klemt Guest

  2. Similar Questions and Discussions

    1. How do you check for empty results
      I am pulling some XML in from PHP. Everything works fine until there are no results. My XML is formed like this: <books> <book> <title>Book...
    2. to check to date must be greater or equal from date
      Hi All, I code my date selection like this : <select name="day" class="formData"> <cfloop index="d" from="1" to="31" step="+1"> <option...
    3. howto get the modification date of a remote file?
      hello all, is there an easy way to get the creation or modification date in a remote server without using ftp_mdtm($url?)? I would like to be...
    4. HowTo check if my String is a Number (Integer) ?
      You can try If IsNumeric(str) Then Convert.ToInt32(str) End If -- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
    5. check if querystring is empty
      if Request.QueryString("sub1")="" then 'it's empty else 'it's something end if "Thomas Henz" <thenz@t-online.de> wrote in message...
  3. #2

    Default Re: HowTo check if Date is empty (#12.00.00 AM#) ???

    "Andreas Klemt" <aklemt68@hotmail.com> wrote
    > I have this
    > Dim myDate As Date
    > How can I check if this date is empty (value #12.00.00 AM# is in there) ?
    >
    Andreas,
    Try using the Date.MinValue property

    If myDate = Date.MinValue Then
    ' myDate is empty
    End If

    --

    Thanks,
    Carl Prothman
    Microsoft ASP.NET MVP
    [url]http://www.able-consulting.com[/url]




    Carl Prothman [MVP] Guest

  4. #3

    Default Re: HowTo check if Date is empty (#12.00.00 AM#) ???

    Thanks Carl,
    that helped me!

    What is better?
    a) If myDate = Date.MinValue Then
    b) If myDate.equals(Date.MinValue) Then

    Regards,
    Andreas

    "Carl Prothman [MVP]" <carlpr@spamcop.net> schrieb im Newsbeitrag
    news:OfkxXmpXDHA.652@TK2MSFTNGP10.phx.gbl...
    > "Andreas Klemt" <aklemt68@hotmail.com> wrote
    > > I have this
    > > Dim myDate As Date
    > > How can I check if this date is empty (value #12.00.00 AM# is in there)
    ?
    > >
    >
    > Andreas,
    > Try using the Date.MinValue property
    >
    > If myDate = Date.MinValue Then
    > ' myDate is empty
    > End If
    >
    > --
    >
    > Thanks,
    > Carl Prothman
    > Microsoft ASP.NET MVP
    > [url]http://www.able-consulting.com[/url]
    >
    >
    >
    >

    Andreas Klemt Guest

  5. #4

    Default Re: HowTo check if Date is empty (#12.00.00 AM#) ???

    "Andreas Klemt" <aklemt68@hotmail.com> wrote
    > What is better?
    > a) If myDate = Date.MinValue Then
    > b) If myDate.equals(Date.MinValue) Then
    >
    Better? They do the same task.

    I prefer the "=" since (IMHO) it's more readable. Plus it's less typing... ;-)

    I think it comes down to developer preference...

    --

    Thanks,
    Carl Prothman
    Microsoft ASP.NET MVP
    [url]http://www.able-consulting.com[/url]



    Carl Prothman [MVP] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139