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 |
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-08-27 : 03:04:53
|
| select compdate from tbljoiningdate Here compdate is a timestamphere i need to select only month & year from the compdate field how to select ? |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-08-27 : 03:10:24
|
| Try itselect cast(month(compdate) as varchar(2))+'-'+cast(year(compdate) as varchar(4))Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-27 : 03:43:46
|
quote: Originally posted by gangadhara.ms select compdate from tbljoiningdate Here compdate is a timestamphere i need to select only month & year from the compdate field how to select ?
Where do you want to show the formatted dates?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|