Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

RE Date Formula

Hi New to crystal. On v11.

I need a formula that will print the date of the 18th of the month following statement date but only if it's on a workday. Otherwise it needs to use the previous fridays date if the 18th falls on a weekend?

Can anyone help me?



didn't get you question properly, what i understood is you wish to have date as 18 for the month and year of statement date with previous day weekend logic

Try the below formula

datevar iDate:= Date(year(stDate),month(stDate) ,18 );

if weekday(iDate)=7 then

DateAdd ("D",-1 , iDate)


if weekday(iDate)=1 then

DateAdd ("D",-2 , iDate)



where stdate is your statement date

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question