SELECT AgencyId,CreatedOn FROM Agencies -- List All Records
SELECT AgencyId,CreatedOn FROM Agencies WHERE (datepart (dw, CreatedOn)) IN (7,1) -- List records Only on saturday and sunday
SELECT AgencyId,CreatedOn FROM Agencies WHERE (datepart (dw, CreatedOn)) NOT IN (5,2) -- List all Records EXCEPT Thuesday and Monday
If u had any trouble just ask, Happy to help u :) Stay Tune... Have a nice day... 'N happy Coding :)
No comments:
Post a Comment