Hai,
Table Structure
Id No Date Time
0001, 01-05-2009, 040000
0001, 02-05-2009, 020000
0002, 01-05-2009, 060000
0002, 01-05-2009, 180000
Time and Date is nvarchar
I want to get the data between
- Yesterday 030001 to today 030000
- Day before yesterday 0300001 to yesterday 030000
I tried the below mentioned query
Select
idno, min (time), max (time)
from
table
where
time between 030001 and 030000
Nothing displayed in the result because it is taking today time from 03.00 am to 03.01am Exactly I need today 03.00 am to yesterday 03.01 am
I need the sql query for the above condition
Can any one help me?
Jash.