Click here to Skip to main content
15,922,325 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have Date1 :2015-07-04 11:23 AND Date2 : 2015-07-06 11:23
I want to display record like Saturday,Sunday,Monday
Posted
Comments
Thanks7872 7-Jul-15 3:18am    
https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=get+day+name+from+date+sql+server+2008

Try Find All the Days Between Two Dates[^].

Use the same query except convert the date using dw.
e.g SELECT DATENAME(dw,'09/23/2013') as dayName
 
Share this answer
 
Comments
shah.nilang 7-Jul-15 3:25am    
I want to combine them into single column using comma like Saturday,Sunday,Monday
_Asif_ 7-Jul-15 4:39am    
Check this
http://stackoverflow.com/questions/455423/how-to-turn-one-column-of-a-table-into-a-csv-string-in-sql-server-without-using
Well, you can use DATENAME for this.

ex.,

SQL
DATENAME(DW, 'YOUR DATE COLUMN')
 
Share this answer
 
Comments
shah.nilang 7-Jul-15 3:24am    
i want to combine them into single column using comma like Saturday,Sunday,Monday

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900