When i select dates through cal in my application formate is 1/1/2001 . In my database date col is string. My SQL query is like this
select c.checkdate,c.grosspay, c.amountofcheck from empcheckinfo c,empdetailinfo e
where e.ssn = '111-11-111'
and e.empnumber = c.empnumber
and right(c.checkdate,4) + left(c.checkdate,4) between '1/1/2001' and '12/31/2001'
I get this result in debug.print sql (when i runt this query in sql i dont get any records ) But if i do
select c.checkdate,c.grosspay, c.amountofcheck from empcheckinfo c,empdetailinfo e
where e.ssn = '111-11-111'
and e.empnumber = c.empnumber
and right(c.checkdate,4) + left(c.checkdate,4) between '01012001' and '12312001'
I get all the records. HOw do i slove this problem .
Thanks in Advance
select c.checkdate,c.grosspay, c.amountofcheck from empcheckinfo c,empdetailinfo e
where e.ssn = '111-11-111'
and e.empnumber = c.empnumber
and right(c.checkdate,4) + left(c.checkdate,4) between '1/1/2001' and '12/31/2001'
I get this result in debug.print sql (when i runt this query in sql i dont get any records ) But if i do
select c.checkdate,c.grosspay, c.amountofcheck from empcheckinfo c,empdetailinfo e
where e.ssn = '111-11-111'
and e.empnumber = c.empnumber
and right(c.checkdate,4) + left(c.checkdate,4) between '01012001' and '12312001'
I get all the records. HOw do i slove this problem .
Thanks in Advance