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 |
|
jeff06
Posting Yak Master
166 Posts |
Posted - 2008-08-28 : 13:57:45
|
| How to calulate month diffence between two formats:'10/23/2008' and '2007/08'?Thanks.Jeff |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-28 : 14:05:46
|
| use DATEDIFF after converting them to datetime using CONVERT function. |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2008-08-28 : 14:06:42
|
| Those are strings soSELECT DATEDIFF(MONTH,'10/23/2008,'2008/08' + '/01')Jim |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2008-08-28 : 17:09:17
|
| moth diff?Butterflies have blobs on the ends of the their antennae. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-29 : 03:13:05
|
quote: Originally posted by jimf Those are strings soSELECT DATEDIFF(MONTH,'10/23/2008,'2008/08' + '/01')Jim
SELECT DATEDIFF(MONTH,'10/23/2008','2008/08' + '/01')MadhivananFailing to plan is Planning to fail |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-29 : 03:13:26
|
quote: Originally posted by Arnold Fribble moth diff?Butterflies have blobs on the ends of the their antennae.
MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|