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.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abie JosePosted Jul 18, 2011, 7:36 AM
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...
Abie JosePosted Jul 18, 2011, 7:25 AM
i thought he needs to retrieve data except Saturdays and Sundays... thats why i put that sql query...
Rohatash KumarPosted Jul 18, 2011, 7:17 AM
can you explain more...
Abie JosePosted Jul 17, 2011, 10:01 AM
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 ...