973-584-9100 contactus@bardess.com

In other words, user defined functions. With utilizing variable parameters, you can create your own functions to
use later.

For example, a function to calculate the number of weeks between two date fields:

[js]



SET fWeekDiff = '(((Year($2)*52)+Week($2))) - (((Year($1)*52)+Week($1)))';



Data:

Load

	StartDate,

    EndDate,

    $(fWeekDiff(StartDate,EndDate)) as NoOfWeeks

;

Load 

    Date#(StartDate,'M/D/YYYY') 	as StartDate,

    Date#(EndDate,'M/D/YYYY') 		as EndDate

Inline [

StartDate, EndDate

1/3/2017, 2/14/2017

2/14/2017, 6/1/2017

6/1/2017, 8/14/2017

];
[/js]

Documentation.

}