You can use NetWorkDays() to calculate working days, it excludes Saturdays and Sundays and given Holidays list.
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.
networkdays ('2007-02-19', '2007-03-01') returns 9
networkdays ('2006-12-18', '2006-12-31', '2006-12-25', '2006-12-26') returns 8
Check this in Help file.
Hi jagan mohan.
You can (should) try and do this calculation in your load script instead of at runtime.
It will render better performance, both CPU and RAM-wise.
This is usually good practise, it will usually not affect file size since those <int> networkdays might already exist in other fields in your datamodel. Thus not adding more data to themodel, instead only linking to existing values already present.
Sorry should have explained myself better I'm creating a weview for other users to see data from a predefined script taken from SAP and am unable to change it. So have to do any data manipulation within the tables I create.
I did this with the information Jagan posted NetWorkDays(ZSD_PIPELINE.ZZCFDT, ZSD_PIPELINE.ZZRQDT)
but only got back 0 values.
Thanks for your help.