Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: DateAdd Error Post Reply Post New Topic
Author Message
Chromeman
Newbie
Newbie
Avatar

Joined: 23 Mar 2009
Location: United States
Online Status: Offline
Posts: 4
Quote Chromeman Replybullet Topic: DateAdd Error
     Posted: 24 Mar 2009 at 11:03am

I'm receiving error (The ")" is missing)  on this DateAdd:

IF {@Forecasted Days to Depletion} <= 365 then
   DateAdd(d,{@Forecasted Days to Depletion},currentdate)
else
  dateadd(d,365,currentdate)
 
My goal here is to add a number value to the current date to project a forecasted end date.  Thanks for any help you have or perhaps another way to produce this value. 


Edited by Chromeman - 24 Mar 2009 at 11:05am
Thanks,
Chromeman
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Mar 2009 at 11:15am
the interval value requires quotes around it
 
IF {@Forecasted Days to Depletion} <= 365 then
   DateAdd("d",{@Forecasted Days to Depletion},currentdate)
else
  dateadd("d",365,currentdate)


Edited by DBlank - 24 Mar 2009 at 11:16am
IP IP Logged
Chromeman
Newbie
Newbie
Avatar

Joined: 23 Mar 2009
Location: United States
Online Status: Offline
Posts: 4
Quote Chromeman Replybullet Posted: 24 Mar 2009 at 11:18am
Thanks again for you help and patience.
Thanks,
Chromeman
IP IP Logged
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