Print Page | Close Window

Adding Dates

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Talk with the Author
Forum Discription: Ask Brian questions about his books and give him your comments. Like the book? Hate the book? Have suggestions? Let me know!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3911
Printed Date: 27 Apr 2024 at 11:51am


Topic: Adding Dates
Posted By: klaxon
Subject: Adding Dates
Date Posted: 06 Aug 2008 at 4:52am
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



Replies:
Posted By: BrianBischof
Date Posted: 09 Aug 2008 at 4:25pm
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.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window