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:


  1. 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):

  1. IF @CurrentMonth >= 4
  2. BEGIN
  3. SET @FiscalYearStart = DATEADD(mm, 3, DATEADD(yyyy, DATEDIFF(yyyy, 0, @CurrentDate), 0))
  4. SET @FiscalYearFinish = DATEADD(mm, -1, DATEADD(yyyy, 1, @FiscalYearStart))
  5. END
  6. ELSE
  7. BEGIN
  8. SET @FiscalYearStart = DATEADD(mm, -9, DATEADD(yyyy, DATEDIFF(yyyy, 0, @CurrentDate), 0))
  9. SET @FiscalYearFinish = DATEADD(mm, -1, DATEADD(yyyy, 1, @FiscalYearStart))
  10. END

Hope this helps you in your report building duties full code below:

  1. Declare @CurrentDate AS DateTime
  2. Declare @CurrentMonth AS int
  3. Declare @FiscalYearStart AS DateTime
  4. Declare @FiscalYearFinish AS DateTime
  5. SET @CurrentDate = GetDate()
  6. SET @CurrentMonth = Month(@CurrentDate)
  7. IF @CurrentMonth >= 4
  8. BEGIN
  9. SET @FiscalYearStart = DATEADD(mm, 3, DATEADD(yyyy, DATEDIFF(yyyy, 0, @CurrentDate), 0))
  10. SET @FiscalYearFinish = DATEADD(mm, -1, DATEADD(yyyy, 1, @FiscalYearStart))
  11. END
  12. ELSE
  13. BEGIN
  14. SET @FiscalYearStart = DATEADD(mm, -9, DATEADD(yyyy, DATEDIFF(yyyy, 0, @CurrentDate), 0))
  15. SET @FiscalYearFinish = DATEADD(mm, -1, DATEADD(yyyy, 1, @FiscalYearStart))
  16. END
  17. 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
image

On Twitter
image

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.
image

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

About our Blog

Brantas Limited specialise in Dynamics CRM, SharePoint and System Integration using the Microsoft Platform. We are all experienced developers in various fields with our own specialities complementing those of our team.

We have been working with SharePoint since 2003, including Installation and Administration, Migration, Development and Support.

RSS Feed