How do i write Sql query so that i could filter data by date time selected, ignoring the time.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manikandan MurugesanRank #300 · 8.4K reputationPosted Jul 6, 2017, 7:50 AM EDT
START_DATEandEND_DATEareDATETIMEdata type, there is nothing wrong with your query. If you are not getting the correct records, Please check the data.date format may trouble you in a different server. There are some good practices you could adhere to avoid such issues.-Also avoid joining tables with WHERE Table1, Table2 which is old and obsolete. JOINs are much better performed, neat and tidy.
You can change your query as follows;Puneet KankarRank #446 · 5.6K reputationPosted Jul 6, 2017, 7:09 AM EDT
Manikandan MurugesanRank #300 · 8.4K reputationPosted Jul 6, 2017, 7:51 AM EDT
Nepethya RanaRank #4,361 · 348 reputationPosted Jul 7, 2017, 8:35 PM EDT