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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 fiscal month days

Author  Topic 

gavakie
Posting Yak Master

221 Posts

Posted - 2010-08-12 : 17:56:52
I need to figure out the days of fiscal month.

I.E.

September would be from august 22nd to september 21st. It needs to show say for the current month.

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2010-08-13 : 01:35:28
i don't see the problem. just code it that it is from 2010/08/22 + 1 month. and so on.

declare @fiscla_date_start smalldatetime
set @fiscal_date_start = '2010/08/22'

select
@fiscal_date_start --2010/08/22
,dateadd(month,1, @fiscal_date_start) --2010/09/22
,dateadd(month,2,@fiscal_date_start) --2010/10/22
Go to Top of Page

gavakie
Posting Yak Master

221 Posts

Posted - 2010-08-13 : 10:23:09
So if today is the 12th I need to show all the days between today and July 22
Go to Top of Page

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2010-08-14 : 04:24:56
which date is fixed? each 22nd of the month is the fiscal month period?
and you want to calculate fiscality from any given date to first next 22nd of this(or next) month?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-14 : 04:32:36
you need to have a table defining fiscal start and end period and then use that for your requirement

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -