Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering BO Report <= Date

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
GB
Good afternoon, I'm having trouble filtering a report based on [Appointment Date] between StartDate and EndDate. Start Date appears to work as I expect
=If [Appointment Date] >= ToDate( "01/01/2015";"dd/mm/yyyy") Then 1
but EndDate does not and returns nothing

=If [Appointment Date] <= ToDate( "31/12/2015";"dd/mm/yyyy") Then 1

So I thought I'd try to break down the process into steps:

MyToDate
=ToDate( [Appointment Date];"dd/mm/yyyy")

Now this produces a variable that displays the correct day and year of [Appointment Date] but all the months are "01", e.g. 10/04/2015 becomes 10/01/2015 and 23/07/2015 becomes 23/01/2015.

I'm rather frustrated. Any ideas please?

Many thanks,
D€$
 
Hi,

Is[Appointment Date] actually a Real Date (ie a NUMBER)?

If so, you can't convert a Date to a Date!!!

If not, you can't compare a string to a Date.
 
Hi Skip, I'm not sure what it actually it is in this new universe that we are testing. The description is:-

"The date of the appointment.Date format of dd/mm/yyyy."

Which is why I can't understand why this only returns blanks:-
=If [Appointment Date] <= ToDate( "31/12/2015";"dd/mm/yyyy") Then 1

Incidentally when I sort the report on that column it lists all the 01/ and ends at 31/ so that doesn't look right to me either.

Many thanks,
D€$
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top