Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Create Global Function
Migrateduser
Hello
I have some code that I'm using many times, and I want to know if I can create like a global function (like the ones from Birt).
For example I Have this code :
//***************************************************************************
// Inputs will be Date1 and Date 2
var Year1= BirtDateTime.year(Date1);
var Mes1 =BirtDateTime.month(Date1);
var day1 = BirtDateTime.day(Date1);
var fecha1 = Year1 + "-" + Mes1 + "-" + day1 +" 18:00:00" ;
var minutos_dia1 = BirtDateTime.diffMinute(Date1,fecha1);
var Year2= BirtDateTime.year(Date2);
var Mes2 =BirtDateTime.month(Date2);
var day2 = BirtDateTime.day(Date2);
var fecha2 = Year2 + "-" + Mes2 + "-" + day2 +" 09:00:00" ;
var minutos_dia2 = BirtDateTime.diffMinute(fecha2,Date2);
var minutos_total = dias_completos*60*9 + minutos_dia1 + minutos_dia2;
output = minutos_total;
// Output will be the variable output.
//************************************************************************************
I want to create like a function :
GetTotalMinutes(DateParameter1,DateParameter2) , and that it returns me the value output.
Where do i have to define it? And is it possible to use it with Rational Team Concert?
THanks !
Find more posts tagged with
Comments
There are no comments yet