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 |
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2014-08-04 : 06:58:24
|
Need have the expression to get the last year same month of the getdate() in derived columnI am trying with (DT_STR,4,1252)DATEPART("yyyy",GETDATE()) + RIGHT("0" + (DT_STR,2,1252)DATEPART("mm",GETDATE()),2) current result 201408expected result 201308THANKSSHANMUGARAJnshanmugaraj@gmail.com |
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2014-08-04 : 08:06:48
|
(DT_STR,4,1252)(DATEPART("yyyy",GETDATE()) - 1) + RIGHT("0" + (DT_STR,2,1252)DATEPART("mm",GETDATE()),2)THANKSSHANMUGARAJnshanmugaraj@gmail.com |
|
|
|
|
|