Print Page | Close Window

Select 24 Hours data for 6am yesterday to 6am

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22144
Printed Date: 28 Apr 2024 at 10:27am


Topic: Select 24 Hours data for 6am yesterday to 6am
Posted By: vitot
Subject: Select 24 Hours data for 6am yesterday to 6am
Date Posted: 15 Nov 2016 at 12:07pm
Hi, I am trying to run a report for the actions took place within last 24 hours starting from 6am yesterday to 6am current date. There are 3 shifts in a day 6am - 2pm, 2pm - 10pm and 10pm - 6am.

I am trying to capture the transactions took place during these shifts. Report will run 7:30 but it should only capture the data between 6am to 6am.

The table has transactiondate and tansactiontime fields. I know these could easily be merged into one field trough a formula.

Any help would be really appreciated.



Replies:
Posted By: DBlank
Date Posted: 16 Nov 2016 at 7:43am
(table.transactiondate = today-1 and table.transactiontime>= time(6,0,0))
Or
(table.transactiondate = today and table.transactiontime < time(6,0,0))


Posted By: vitot
Date Posted: 18 Nov 2016 at 8:20am
Thank you DBlank. This will work! Thank you for all the help.



Print Page | Close Window