Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Date comparision does not work in VB 6 (http://www.go4expert.com/forums/date-comparision-vb-6-t4943/)

sha_agrawal 27Jun2007 18:49

Date comparision does not work in VB 6
 
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.

pradeep 28Jun2007 11:05

Re: Date comparision does not work in VB 6
 
Try this

Code: VB

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



All times are GMT +5.5. The time now is 13:59.