Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dateadd function Post Reply Post New Topic
Author Message
lsalih
Groupie
Groupie


Joined: 27 Sep 2007
Location: United States
Online Status: Offline
Posts: 44
Quote lsalih Replybullet Topic: Dateadd function
     Posted: 11 Jun 2010 at 5:28am

Hello,

I have a field that is varchar2 in the backend, the data is entered in dd/mm/yyyy format (this is a user defined field that the user used to store data). I need to add 90 days to dd portion of the data.

When I use Dateadd('d', 90,cdate({TABLE.DESC2}), I get into issues when I write formulas else where. I thought may be I should use variables to first convert to date and then do the add, below is what I put together:

datevar XDATE:= cdate({TABLE.DESC2});
datevar CONVDATE:=dateadd('d', 90, XDATE)
 
In my second line I get an error, it says date is rewuired here.
 
Can someone please suggest me a better way to deal with this issue?
 
Thanks.
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