Bennie47250
Programmer
Using Crystal CR Developer version 14.0.4.738 and a MS SQL database
Was using this formula in Crystal version 7.0 without any issues but in version 14 it throws the error "Month number must be between 1 and 12".
The formula is: {@DateClosed} in Date (Year (CurrentDate),Month (CurrentDate)-1 , 16) to Date (Year (CurrentDate),Month (CurrentDate) ,1 )-1
When checking the formula it is highlighting this part "Date (Year (CurrentDate),Month (CurrentDate)-1 , 16)"
I suspect the issue is with "Month (CurrentDate)-1" since this is month 1 when it subtracts 1 it leaves 0.
Apparently Crystal 7 was smart enough to know this is a date and when you are in month 1 that subtracting 1 is 12 not 0.
Is there another data function I should be using that know when in month 1 subtracting 1 is 12 not 0?
Thanks Bennie
Was using this formula in Crystal version 7.0 without any issues but in version 14 it throws the error "Month number must be between 1 and 12".
The formula is: {@DateClosed} in Date (Year (CurrentDate),Month (CurrentDate)-1 , 16) to Date (Year (CurrentDate),Month (CurrentDate) ,1 )-1
When checking the formula it is highlighting this part "Date (Year (CurrentDate),Month (CurrentDate)-1 , 16)"
I suspect the issue is with "Month (CurrentDate)-1" since this is month 1 when it subtracts 1 it leaves 0.
Apparently Crystal 7 was smart enough to know this is a date and when you are in month 1 that subtracting 1 is 12 not 0.
Is there another data function I should be using that know when in month 1 subtracting 1 is 12 not 0?
Thanks Bennie