searching between dates with "where" in msSQL
i have a table that has two date fields (dateinx and dateoutx) and i need to find all the results for todays date that both fall between and on that date for a given customer: cID.
if todays date is 12/2/2012
examples of vialable entries:
dateinx=12/2/2012 and dateoutx = 12/5/2012
dateinx=11/2/2012 and dateoutx = 12/2/2012
dateinx=11/2/2012 and dateoutx = 12/25/2012
i am using "smalldatetime" in msSQL2005 and also would like to create a mask so that only date: 1/1/2012 would be saved.
same for time: 1:30AM in a seperate field. msSQL is saving now as 1/1/2012 01:30:00AM or some such...
querey at this point looks like:
SELECT *
FROM schdl
WHERE (cID = #cID#) AND ....
tnx in advance
andy
