I am trying to select records from a table based on a couple of time criteria and I have no idea how to go about this using Crystal Reports XI. I need to create a report that shows all the units that have purchases(date/time) within an 8 hour period but not the purchases that occurred within 30 minutes of each other. All of the data is located in one table.
Sample data:
UNIT DATE TIME
TG5648 12/12/2009 04:50:00
RT3235 12/18/2009 07:45:00
TG5648 12/12/2009 05:30:00
YT3245 12/19/2009 08:43:00
TG5648 12/12/2009 04:55:00
The report should select the 1st and 3rd records in the sample data because they have the same unit number and the date/time is within 8 hours of each other. However it should not select the 5th record because it is under 30 minutes from the first record.
Any advice or tips as to how to accomplish this would be much appreciated!
Sample data:
UNIT DATE TIME
TG5648 12/12/2009 04:50:00
RT3235 12/18/2009 07:45:00
TG5648 12/12/2009 05:30:00
YT3245 12/19/2009 08:43:00
TG5648 12/12/2009 04:55:00
The report should select the 1st and 3rd records in the sample data because they have the same unit number and the date/time is within 8 hours of each other. However it should not select the 5th record because it is under 30 minutes from the first record.
Any advice or tips as to how to accomplish this would be much appreciated!