Crystal Report 9.0 Date Range String

I have a date and time value (String) that looks like this:

02/01/2005 08:49:04
I would like to display only field DateValue (TICKETDATE [1 to 10] in {?receivedDate} to {?EndDate} and it keeps bringing back an error DateRange required over {?ReceivedDate} and {?EndDate}

I would like the display to show dates begining 10/01/2008 - 03/31/2009

Please Help
cdmccoyAsked:
Who is Participating?
 
mlmccConnect With a Mentor Commented:
If you are hardcoding try this
Your ticket date is a date or datetime filed not a string
Date({TicketDate}) IN Date(2008,10,01) to Date(2009,3,31)

If you are using parameters make the start and end date DATE type and use
Date({TicketDate}) IN {?startdate} to {?enddate}

If ticketdate is a string then
Date(Val(Mid({TicketDate},7,4),Val(Mid({TicketDate},1,2),Val(Mid({TicketDate},4,2))  IN Date(2008,10,01) to Date(2009,3,31)

mlmcc
0
 
mlmccCommented:
Are the parameters date types?

mlmcc
0
 
cdmccoyAuthor Commented:
String Datetime.  
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
mlmccCommented:
There is no type like that.
So is one of them a string abd the other a datetime?

If so you will have to convert the sting to a date also

mlmcc
0
 
cdmccoyAuthor Commented:
Exactly -- I need to convert the string to a date

The data when I pull the field it shows 02/01/2005 08:49:04 format
0
 
mlmccCommented:
Your formula seems to be doing that.  You may need to convert one of the parameters also in the same way.

mlmcc
0
 
cdmccoyAuthor Commented:
Let me explain better.  The database field is in a datetime format 02/01/2005 08:49:04 format.  I would like to pull a select criteria for it to look for records, TICKETDATE >= '10/01/2008" TO TICKETDATE <= '03/31/2009'

It displays an error message "Bad Date Format".  When I try --> DateTimeValue {TICKETDATE} [1 TO 10]), It again states that I have a bad date format.  Please Heeelp.  What am I doing wrong.  The field TICKDATE is a string.
0
 
cdmccoyAuthor Commented:
Would someone please assist me if you can?  I know it's a holiday.
0
 
cdmccoyAuthor Commented:
Thank you sooooo much this one worked for me... Date({TicketDate}) IN Date(2008,10,01) to Date(2009,3,31).  Did I explain it incorrectly the first time?  You got it on the first try.....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.