Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-09-12 : 07:44:45
|
| vinay writes "Respected SirI want to display months between 2 dateslike startdate is 01/01/2005and enddate is 01/05/2006output should bejan 2004feb 2004.... tillapr 2005may 2005with regardsvinay.r" |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-09-12 : 09:22:43
|
but you can do this:for this you need a table of dates which you must create.then you simply do:select distinct datename(m, YourDateColumn) + datename(yy, YourDateColumn) where YourDateColumn between '01/01/2005' and '01/05/2006'Go with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|