Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
i have written the code for calculating business hours between two dates in a SUB. how to call that from model through passing the fields to the SUB. as i need to calculate the business hours for each callno and i have to find this for many number of field combination i have still some more date fields to find. can any one help me on this plz....
Do you want this sub to be used in load statement? If so, then create function in edit module/macro using vb/java script. Otherwise, sub created in the load script can't be used in load.
thanks for the reply... i just want to calculate the business hours for many fields how do i do that... if i write macro and call that each time it may impact the performance of the application as data is huge may be around 5k calls per day...
Have a look at the below example:
Sub Load1( F1, F2)
Final:
Load
$(F1)*100 as Field1,
$(F2)*100 as Field2
Resident data;
End Sub
data:
load * Inline [
A, B, C
1, 2, 3
4, 5, 6
];Call Load1('A', 'B');
Call Load1('B','C');Drop Table data;
Hope this helps.
thanks a lot... it is working fine.