Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

fin_month?

Hi,

I am doing financila month name and month no.in edit script.My Financial year starts with Apr-Mar.

Example:-Apr-2011 to Mar-2012 is my financial year 2012.

                Apr-2012 to Mar-2013 is my financial year 2013.

I  am using this,

if(Num(Month(Date(date)))>3,Num(Month(Date(date)))-3,Num(Month(Date(date)))+9) as Fin_MonthNo,

left(Monthsname(1,date,0,4),3) AS Fin_Month_Name,

But it is showing only Jan month, monthno is 10.I dont know why it is showing only one month name and no.

can any help me for correct syntex.

regards,

baru

2 Replies
Not applicable
Author

Hi,

can any help me this problem.

regards,

baru

hic
Former Employee
Former Employee

I would do it the following way: All you need to do is to replace the Transaction table with whatever you have.

// ===== Some dummy transactions

Transactions:

Load

          rand() as Amount,

          Date(round(MakeDate(2008) - 1 + 1000*rand())) as date

          autogenerate 1000;

 

// ====== and a master calendar...

Set vFirstMonthOfFiscalYear = 4;

MasterCalendar:

Load distinct *,

          if(Month>FiscalMonth,Year & '/' & (Year+1), (Year-1) & '/' & Year) as FiscalYear;

Load *,

          Dual(Month,Mod(Month-$(vFirstMonthOfFiscalYear),12)) as FiscalMonth;

Load

          date,

          Year(date) as Year,

          Month(date) as Month,

          Date(MonthStart(date),'YYYY MMM') as RollingMonth

          resident Transactions;

HIC