Skip to Content
avatar image
Former Member

Date search after converting String to Date

Hi All,

I'm new to CR so easy to got lost and confused. I have a field that is a BookingDate in a string format. there are some blanks and also "unbooked". I have written in Select Expert - Record

{tblReport_Current_Pregnancy_10.BookingDate} <> "" and
{tblReport_Current_Pregnancy_10.BookingDate} <> "unbooked"

This works so that all I am left with is a string in "dd/MM/yyyy". However, I need to do a search to and from with this and this is where I get lost. I have looked and many forums and seen lots of advice which all seems good but none works or maybe I'm doing it in the wrong places. I normally just do a parameter (?DateSearch) but I want it to be a date not a string. As I'm using CR2016, I dont need the date to and from part as I change the Option Allow range values to true.

This is a major problem as 50% of my reports will be dealing with the Booking Date. any tips welcome but i may need it simplified to where i do things to.

Paddy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 06 at 02:59 PM

    Hi Paddy,

    Assuming you have a Date Range prompt in the report, you'd need to modify the selection formula to:

    isDate({tblReport_Current_Pregnancy_10.BookingDate}) AND
    Date({tblReport_Current_Pregnancy_10.BookingDate}) IN {?Date Range Prompt}

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded