S
Sivakumar V via AccessMonster.com
I am using vb-access for my application. In one report i am using between operator in SQL to fetch data from access database.
the following is the query:
SQL = "Select * from tbl1 where unit =1 " _
& " and utdt between #" & frmdt & "#" _
& " and #" & todt & "#"
set sRs = dbCN.execute(sql)
if i am giving 31/12/2004 as from date and 1/1/2005 as to date working perfectly.
if i am giving 31/12/2004 and 2/1/2005 as a from and to date because of 2/1/2005 is a holiday the query fetching beyond the limit of "todate"
what is the solution ???
the following is the query:
SQL = "Select * from tbl1 where unit =1 " _
& " and utdt between #" & frmdt & "#" _
& " and #" & todt & "#"
set sRs = dbCN.execute(sql)
if i am giving 31/12/2004 as from date and 1/1/2005 as to date working perfectly.
if i am giving 31/12/2004 and 2/1/2005 as a from and to date because of 2/1/2005 is a holiday the query fetching beyond the limit of "todate"
what is the solution ???