Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i have the following statement
If(isNull(%DatXX_Ölev_KO)),%Dat1 - %Dat2,%Dat1 - %Dat3) as DayAmount;
what i would like to do with this statement is add the function networkingdays for the two condtions,
ie %Dat1 - %Dat2 and
%Dat1 - %Dat3
i tried the following
If(networkingdays(isNull(%DatXX_Ölev_KO))),%Dat1 - %Dat2,%Dat1 - %Dat3) as DayAmount;
this however without success.
any help is greatly appreciated
best
Brad
First, both expressions seem to have unbalanced number of opening and closing round brackets, please recheck.
The syntax of networkdays() function is
networkdays (start:date, end_date {, holiday})
Returns the number of working days (Monday-Friday) between and including start_date and end_date taking into account any optionally listed holidays. All parameters should be valid dates or timestamps.
So you need to state at least two arguments (start date, end date). I think your end date is %dat1 and your start date either %Dat2 or %Dat3 (maybe the other way round, I assume your difference calculation should end up in a positive number so it should be later date - earlier date.
So try
networkdays( if(isnull(%DatXX_Ölev_KO), %Dat2, %Dat3), %Dat1 ) as NetworkDays
First, both expressions seem to have unbalanced number of opening and closing round brackets, please recheck.
The syntax of networkdays() function is
networkdays (start:date, end_date {, holiday})
Returns the number of working days (Monday-Friday) between and including start_date and end_date taking into account any optionally listed holidays. All parameters should be valid dates or timestamps.
So you need to state at least two arguments (start date, end date). I think your end date is %dat1 and your start date either %Dat2 or %Dat3 (maybe the other way round, I assume your difference calculation should end up in a positive number so it should be later date - earlier date.
So try
networkdays( if(isnull(%DatXX_Ölev_KO), %Dat2, %Dat3), %Dat1 ) as NetworkDays