Try this Sql Query to get all the record of yesterday.......or last 15 days record or last n days records......
"select * from tablename WHERE CONVERT(VARCHAR(10), colname, 112)>= CONVERT(VARCHAR(10),DATEADD( DAY,-(n-1),GETDATE()), 112)"
"select * from tablename WHERE CONVERT(VARCHAR(10),
No comments:
Post a Comment