cancel
Showing results for 
Search instead for 
Did you mean: 

Date Time Field Selection Issue

Former Member
0 Kudos

Hi, I Am using Crystal Reports XI and I having a problem with a date-time field. I ave a formula field INVDATE defined as (tonumber(totext(year({OINV.DocDate}),'##')totext(month({OINV.DocDate}),'#')totext(day({OINV.DocDate}),'#')), In the Select Expert I have the following comparison ({@INVDATE}in {?Begin Date} to {?End Date}) the begindate/enddate are defined numeric parameters. My Field from the table is define as date time field. My reports is only picking up records from 20081110, but I am passing parameter values of 20081101 to 20081130. Ny idea's on how to correct this.

Thanks

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

That looks like it fixed the problem. I thank you very much.

Jim DYer

Former Member
0 Kudos

I still recevie the same error. Thanks

Former Member
0 Kudos

Try using date field directly instead of formula for {OINV.DocDate} in record selection

{OINV.DocDate}>={@BEGINDATE} and {OINV.DocDate}<={@ENDDATE}

Regards,

Raghavendra

Former Member
0 Kudos

I entered the formula field @Begin Date as

date(tonumber(totext({?Begin Date})[1 to 4]),tonumber(totext({?Begin Date})[5 to 6]),tonumber(totext({?Begin Date})[7 to 8]))

and

the formula field @End Date as

date(tonumber(totext({?End Date})[1 to 4]),tonumber(totext({?End Date})[5 to 6]),tonumber(totext({?End Date})[7 to 8]))

and the formula field as @INVDATE as

WhileReadingRecords;

tonumber(totext(year({OINV.DocDate}),'##')totext(month({OINV.DocDate}),'#')totext(day({OINV.DocDate}),'#')).

Then I added in the Select Editor :({@INVDATE}in {@BEGINDATE} to {@ENDDATE})

Now i am receiving a error, "A number range is required here"

Any Ideas what this error is?

Thanks for your help.

Jim Dyer

Former Member
0 Kudos

Try this selection formula

{@INVDATE}>= {@BEGINDATE} and {@INVDATE}<={@ENDDATE}

Regards,

Raghavendra

Former Member
0 Kudos

Try to convert the parameter values into a date format like this

@BeginDate:

date(tonumber(totext({?Begin Date})[1 to 4]),tonumber(totext({?Begin Date})[5 to 6]),tonumber(totext({?Begin Date})[7 to 8]))

Same for @End Date and now use the selection formula like this

({@INVDATE}in {@Begin Date} to {@End Date})

Regards,

Raghavendra

Edited by: Raghavendra Gadhamsetty on Nov 11, 2008 4:43 PM

Former Member
0 Kudos

Does anyone have time to help me with this issue, I am really needing to get an answer on this if possible. It appears to me the formual is not pulling in the days under 10. Example would be the report will pull in 20081110, but it will not pull in the data 20081101. 20081102, etc. Something with the day field in the formula dosent appear to be working correctly.

Thanks You

Former Member
0 Kudos

Does anyone have time to help me with this issue, I am really needing to get an answer on this if possible. It appears to me the formual is not pulling in the days under 10. Example would be the report will pull in 20081110, but it will not pull in the data 20081101. 20081102, etc. Something with the day field in the formula dosent appear to be working correctly.

Thanks You