Print Page | Close Window

Grouping by Transaction Date/Time

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17135
Printed Date: 30 Apr 2024 at 9:59am


Topic: Grouping by Transaction Date/Time
Posted By: ewhite
Subject: Grouping by Transaction Date/Time
Date Posted: 26 Jul 2012 at 4:55pm
I have a POS sales database and each transaction has a sales date.
The issue i am having is that i want to group all sales between 7am and 6.59am the next day into one date. When I group by sales date all transactions after midnight are added onto the next day.
Any help would be appreciated....



Replies:
Posted By: DBlank
Date Posted: 27 Jul 2012 at 9:37am
use the dateshift() function to move your value by 7 hours, group on that formula result but display the original data field


Posted By: ewhite
Date Posted: 29 Jul 2012 at 7:22pm
 
DateShift didn't work in crystal so it got me searching and i found the solution.
 
ShiftDateTime was what i needed and I did what you said and grouped by my formula.
 
It took me a while to figure it out but this is what i used.
 
shiftdatetime ({RegisterSale.SaleDate},"AEST,-960,AEST","")
 
this put each transaction datetime back by 7 hours and now all is reporting correctly.
 
Thanks alot for your response.
 
 
 
 
 



Print Page | Close Window