Posted by (JavaScript must be enabled to view this email address) on Tue 28 Jul 2009
The first thing to do is get the current month:
SET @CurrentDate = GetDate()SET @CurrentMonth = Month(@CurrentDate)
Then its just a case of setting the start and end of the fiscal year according to whether the month falls in the last quarter (Jan, Feb, Mar) or the first three quarters (April thru to Dec):
IF @CurrentMonth >= 4 BEGIN SET @FiscalYearStart = DATEADD(mm, 3, DATEADD(yyyy, DATEDIFF(yyyy, 0, @CurrentDate), 0)) SET @FiscalYearFinish = DATEADD(mm, -1, DATEADD(yyyy, 1, @FiscalYearStart)) END ELSE BEGIN SET @FiscalYearStart = DATEADD(mm, -9, DATEADD(yyyy, DATEDIFF(yyyy, 0, @CurrentDate), 0)) SET @FiscalYearFinish = DATEADD(mm, -1, DATEADD(yyyy, 1, @FiscalYearStart)) END
Hope this helps you in your report building duties full code below:
Declare @CurrentDate AS DateTime Declare @CurrentMonth AS int Declare @FiscalYearStart AS DateTime Declare @FiscalYearFinish AS DateTime SET @CurrentDate = GetDate() SET @CurrentMonth = Month(@CurrentDate) IF @CurrentMonth >= 4 BEGIN SET @FiscalYearStart = DATEADD(mm, 3, DATEADD(yyyy, DATEDIFF(yyyy, 0, @CurrentDate), 0)) SET @FiscalYearFinish = DATEADD(mm, -1, DATEADD(yyyy, 1, @FiscalYearStart)) END ELSE BEGIN SET @FiscalYearStart = DATEADD(mm, -9, DATEADD(yyyy, DATEDIFF(yyyy, 0, @CurrentDate), 0)) SET @FiscalYearFinish = DATEADD(mm, -1, DATEADD(yyyy, 1, @FiscalYearStart)) END SELECT @FiscalYearStart, @FiscalYearFinish
Posted by (JavaScript must be enabled to view this email address) on Mon 27 Jul 2009
We’ve now integrated Twitter and MOSS so that users never have to leave the portal to tweet. Sounds useless right? I mean all it does is post a message to your twitter page and get your twitter status back.
On MOSS/SharePoint 2007

On Twitter

Suppose though you have a tighly locked down network and dont want your users wasting their entire day on Twitter. You can lock out access from Twitter altogether, but that means your users and staff may feel constrained at work and eventually their productivity may drop. Why not allow them to update their Twitter using their own My Site? It gives users apparent freedom to maintain their social circle yet because they are within your organisations MOSS Portal work is never far away.
Non-Twitter users aren’t left out as they still get to see the Twitter status on the site, even though they may not have a username or password.

Use the Brantas Tweet web part on their mysite, your users will feel they have a bit of freedom, but at the same time you can ensure that users dont spend all day on Twitter.
Page 1 of 1 pages