how can I check for empty dates(null date) in vb.net

Discussion in 'C#' started by kharearch, Nov 23, 2008.

  1. #1
    I want to check empty date (null date) from table in vb.net. how can I do that. can somebody write me code? Thanks
     
    kharearch, Nov 23, 2008 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    what's the code that you have? what type of database? more information
     
    camjohnson95, Nov 25, 2008 IP
  3. yugolancer

    yugolancer Well-Known Member

    Messages:
    320
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    
    If IsDBNull(reader("field")) Then
       ' To Do something ...
    End If
    
    Code (markup):
     
    yugolancer, Nov 27, 2008 IP
  4. yugolancer

    yugolancer Well-Known Member

    Messages:
    320
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #4
    you may want to check this out as well:

    
    If String.IsNullOrEmpty(reader("field").ToString) Then
       ' To Do something ...
    End If
    
    Code (markup):
     
    yugolancer, Nov 27, 2008 IP