Retrieve date from SQL Server
I want to retrieve date on my web page only those dates where Saturday and Sunday don't exist. I want to show only Monday to Friday dates.
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Abie Jose111 reputationPosted Jul 17, 2011, 6:01 AM EDT
select doj, DATENAME(weekday,convert(smalldatetime,doj,103)) as days from
where DATENAME(weekday,convert(smalldatetime,doj,103)) not in ('SATURDAY','SUNDAY')
in this example, the datatype of "DOJ" is varchar
CONVERT(smalldatetime,,)
Hope this will work ...
Rohatash KumarRank #12 · 57.7K reputationPosted Jul 18, 2011, 3:17 AM EDT
can you explain more...
Abie Jose111 reputationPosted Jul 18, 2011, 3:25 AM EDT
i thought he needs to retrieve data except Saturdays and Sundays... thats why i put that sql query...
Abie Jose111 reputationPosted Jul 18, 2011, 3:36 AM EDT
didn't find to hide the weekend dates...
but in the following link you can see how to disable the week ends please try...
http://dotnetask.com/Resource.aspx?Resourceid=710
sorry for my prev. post...