
December 23rd, 2003, 03:36 PM
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Comparing Date&Time In MS Access
Hello,
Iam haing problem in comparing Date&Time.Whats the syntax of comparing date&time together.Im using ASP for the web where user enters two values of Date&Time and i have to compare these with the ones stored in Database to retrieve the records within the entered values of Date&time.How do i structure my query
The format is as follows MM/DD/YYYY HH:MI:SS AM or PM
I tried this query... no use!!!
query = "SELECT s.GroupNum,s.OID,s.IP,s.Value,s.Datim,s.Status,r.O IDNam FROM stat s, ref r WHERE s.OID=r.OIDNum AND IP='"&Request("ip")&"' AND GroupNum ="&OID
query = query & " AND s.Datim BETWEEN #'"&Request("time1")&"'# AND #'"&Request("time2")&"'"
Regards
|