on 2024 Oct 29 6:44 PM
In Crystal Reports, how to subtract a number of business days (Monday through Friday) from an input date?
For example, October 29, 2024 - 16 business days = October 7, 2024
Request clarification before answering.
Hi,
Use this function module to subtract a number of business days (Monday through Friday) from an input date.
DATA: lv_date TYPE sy-datum. "Input Date
DATA: lv_business_days TYPE i VALUE 10. "Number of business days to subtract
DATA: lv_new_date TYPE sy-datum. "Output Date
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = lv_date "October 29, 2024
days = lv_business_days "16 business days
months = 0
years = 0
signum = '-'
IMPORTING
calc_date = lv_new_date. "October 7, 2024
WRITE: / lv_date, lv_new_date.
Regards,
Ranjan Panda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
9 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.