1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Date comparision does not work in VB 6

Discussion in 'Visual Basic ( VB )' started by sha_agrawal, Jun 27, 2007.

  1. sha_agrawal

    sha_agrawal New Member

    Joined:
    Jun 25, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hai
    Please help me to sort out this problem. I am using vb6 with Ms-Access. I have a
    table containing amount & date, I wrote following query to extract date wise list

    "select date,amont from table1 where date =" & chr(35) & vardate & chr(35)

    Vardate is a variable containing date type value
    where am i wrong, Please guide me.
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    Try this

    Code:
    Sql = "select date,amont from table1 where date =#" & vardate & "#"
    
     

Share This Page