Print Page | Close Window

Fiscal Day

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4932
Printed Date: 27 Apr 2024 at 3:48pm


Topic: Fiscal Day
Posted By: TallActor
Subject: Fiscal Day
Date Posted: 04 Dec 2008 at 12:24pm
I am self-taught on Crystal and SQL, so please bear with me. My basic problem is trying to define a "day" from sequential Start and Stop datetime fields. I read from a database which lists tasks from a Warehouse Management system. Employees work shifts that start and stop anywhere in the 24/7 spectrum so I can't 'define' a workday as 3am to 3am, for example. The only constant is that by contract, an employee can't work shifts less than 6 hours apart. I want to 'define' a day based on the datetime fields between 6 hours 'gaps'. So, an employee starts Monday at 6am (0600) and works until 230pm (1430) then starts his next shift at 1130pm (2330) and works until 8am (0800). I have a 'gap' between datetimes of greater than 6 hours to define the day. Previous() and Next() will allow me to compare, but then I have a result I can't summarize. 
Any suggestions?
I am also pursuiing an answer at the SQL level.
Thanks.



Print Page | Close Window