Adding Dates

Printed From: Crystal Reports Book — Forum Name: Talk with the Author

Hi,
 
I have been trying to add dates together but keep getting syntax errors.
Can anyone please help
 
if {traders.creditmethod} = "E"
then DateAdd ("d",{@Days to Month End} ,{traders.creditdays} )
else DateAdd ("d",{slsummary.taxdate} ,{traders.creditdays} )
 
 
Thanks

Mofi
I think the parameters are in the wrong order. The second parameter is units to add and the third parameter is the date field. Also, make sure the second parameter is an integer.