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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shift of Occurrence

Status
Not open for further replies.

pblazeppd

MIS
Jun 27, 2001
16
US
Hi all,

Using CR9, with ODBC connection to SQL DB.

Problem: Need to determine if an event occurred on a particular shift or any combination of shifts.

have F_DateTime (From DateTime), T_DateTime (To DateTime)
(times are in military time)

Shifts are as follows: 06:00-13:59, 14:00-21:59, and 22:00 to 05:59.

IE: F_DateTime T_DateTime Shift Occurred
4/1/2007 10:49 4/2/2007 01:23 1/2/3
4/2/2007 22:00 4/2/2007 02:00 3
4/2/2007 00:59 4/2/2007 08:00 1/3
etc..

Thanks for all help...
Phil
 
I think you need three formula-field tests, each of which tests if the event started during the shift or before the shift.

From the results of these tests, you can then do another formula field with a suitable display. I can't see a better way that long-windedly coding a distinct display for each of the possibly combinations.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top