Mamta
Mamta

Reputation: 107

how to select the records in where clause with particular date

"SELECT * FROM FeeTrans where FeeTrans.rec_date = #11/25/2016#"

i want to fetch the records with exact this date but no records is coming i have tried "<>" symbols also but it fetches other date also

my rec date's data is in date/time(mm/dd/yyyy)

rec_date

  1. 06/25/2016
  2. 11/25/2016
  3. 11/25/2016
  4. 11/25/2016
  5. 11/25/2016
  6. 06/14/2016
  7. 11/25/2016

Thank you

Upvotes: 0

Views: 89

Answers (1)

Gustav
Gustav

Reputation: 55816

Sounds like your recorded dates contain time as well. Try this:

"SELECT * FROM FeeTrans WHERE Fix(FeeTrans.rec_date) = #11/25/2016#"

Or (faster if many records):

"SELECT * FROM FeeTrans WHERE FeeTrans.rec_date Between #11/25/2016# And #11/25/2016 23:59:59#"

Upvotes: 1

Related Questions