tn_sudheer
Programmer
Hello all.,
Hope all dng gud..
I have a application where I will log my data in ms SQL every one hour..
So for reporting purpose I will fetch data from db, based on time stamps.
Let's say I want to fetch data in between 12-07-2021 8:00:00 to 13-07-2021 8:00:00 (i.e 24 hrs data)
So for this my query is like this.
Select value 1 from table1 where timestring between '12-07-2021 8:00:00' And '13-07-2021 8:00:00'.
So as a result I am getting data like this
12-07-2021 8:00:00 to 12-07-2021 23:00:00 ,
13-06-2021 00:00:00 to 13-06-2021 23:00:00,
13-07-2021 00:00:00 to 13-07-2021 8:00:00.
So as per my query I am not requesting data on month of 6th, but here I was getting., How..??
Can anyone suggest me where I was getting wrong..??
Hope all dng gud..
I have a application where I will log my data in ms SQL every one hour..
So for reporting purpose I will fetch data from db, based on time stamps.
Let's say I want to fetch data in between 12-07-2021 8:00:00 to 13-07-2021 8:00:00 (i.e 24 hrs data)
So for this my query is like this.
Select value 1 from table1 where timestring between '12-07-2021 8:00:00' And '13-07-2021 8:00:00'.
So as a result I am getting data like this
12-07-2021 8:00:00 to 12-07-2021 23:00:00 ,
13-06-2021 00:00:00 to 13-06-2021 23:00:00,
13-07-2021 00:00:00 to 13-07-2021 8:00:00.
So as per my query I am not requesting data on month of 6th, but here I was getting., How..??
Can anyone suggest me where I was getting wrong..??