Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date problem in Crystal Reports 10 Post Reply Post New Topic
Author Message
cahill
Newbie
Newbie


Joined: 02 May 2009
Online Status: Offline
Posts: 3
Quote cahill Replybullet Topic: Date problem in Crystal Reports 10
     Posted: 02 May 2009 at 6:08am
hi all. please i need help from the experts. my problem is that I'm not able to view data when Date is like this 01/04/2009
here is my Code
        mReport.RecordSelectionFormula = "{tbl_Sales.Date}  IN #" & dtpFrom.Value & "# TO #" & dtpTo.Value & "#"
thank you all.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 04 May 2009 at 6:46am
try removing the #s.  If all of the fields are all defined as datetime, Crystal will figure out if they in the range or not
 
IP IP Logged
cahill
Newbie
Newbie


Joined: 02 May 2009
Online Status: Offline
Posts: 3
Quote cahill Replybullet Posted: 05 May 2009 at 9:27am
Thanks lockwelle . Fix using this formela.
 
   mReport.RecordSelectionFormula = "{tbl_Sales.Date} >= cdate(" & Format$(dtpFrom.Value, "yyyy,mm,dd") & ")" & _
                         " AND {tbl_Sales.Date} <= cdate(" & Format$(dtpTo.Value, "yyyy,mm,dd") & ")"
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