Hello i have been search for many days and cannot seem to find a answer to my question so i thought i would seek assistance from this helpful community ;p
I have a database that stores date and time in the same column. the field is of type Date/Time and cannot be changed. i would like to search between 2 dates and a specific time between those two dates in SQL.
is this possible? the date is stored in the field as "2/05/2011 2:34:22 PM". i can search between 2 dates fine....but when every i try to question anything about the time it is like it cannot access the time value located in the column ;/
Text36 = start date
Text38 = finish date
Text9 = start time
Text11 = finish time
Code:
SELECT DISTINCT Historical_Data.MessageNo, Historical_Data.DateTime, Historical_Data.UserName, Historical_Data.FCS, Historical_Data.KKSCode, Historical_Data.Message
FROM Historical_Data
WHERE (((Historical_Data.DateTime) (BETWEEN Forms!Main_Form!Text36 AND Forms!Main_Form!Text38) AND (BETWEEN Forms!Main_Form!Text9 AND Forms!Main_Form!Text11)));