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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manikandan MurugesanPosted Jul 6, 2017, 11:50 AM
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;Nepethya RanaPosted Jul 8, 2017, 12:35 AM
Manikandan MurugesanPosted Jul 6, 2017, 11:51 AM
Puneet KankarPosted Jul 6, 2017, 11:09 AM