Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Will Excel formula work in Crystal? Post Reply Post New Topic
Author Message
jevremovj
Newbie
Newbie


Joined: 22 Feb 2012
Online Status: Offline
Posts: 5
Quote jevremovj Replybullet Topic: Will Excel formula work in Crystal?
    Posted: 23 Apr 2012 at 10:27am
Hi - I'm new to Crystal and trying to use the "edate" formula that I use in Excel to create a new formula field in Crystal. In Excel, I would just take my ship date field and my # of months on rent field to use in my formula with =edate(ShipDate,#Months)... I'm trying to figure out how to enter it in Crystal, keep getting the error "the remaining text does not appear to be part of the formula" so I'm sure it's a beginners error.
 
Here is my attempt at the formula that isn't working:
 
=edate({RO1_ContractHeader.OriginalShipDate},{RO_90_UDF_ROContractHeader.No_Months})
 
Any advice would be appreciated.
 
Julie J
Julie J
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 23 Apr 2012 at 1:45pm

"edate" is not a function that's available in Crystal.  If you're trying to add months to a date, you should use the DateAdd() function.  Look in the Crystal Help for the syntax.

-Dell
IP IP Logged
jevremovj
Newbie
Newbie


Joined: 22 Feb 2012
Online Status: Offline
Posts: 5
Quote jevremovj Replybullet Posted: 23 Apr 2012 at 2:00pm
Oh, thank you so much for your feedback, I found the help screen on DateAdd and put in this formula to add to the # of months.
DateAdd (m,{RO_90_UDF_ROContractHeader.No_Months} ,{RO1_ContractHeader.OriginalShipDate} )
 
but new error says "The ) is missing"... I have a ( before the "M" and at the end, not sure where else I would have another end parenthesis?
 
Help?
Julie J
IP IP Logged
jevremovj
Newbie
Newbie


Joined: 22 Feb 2012
Online Status: Offline
Posts: 5
Quote jevremovj Replybullet Posted: 23 Apr 2012 at 2:05pm
Oh, no worries, I just figured out my problem... the M needed to have "m" around it... thank you sooooo much, I'm so excited my formula works now!
Julie J
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.