Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 abhaysingh
		
			abhaysingh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hey Guys,
I need some support,
i have scenario in which production i happening 24/7 in 3 shift, Morning, Evening and Night.. Night Shift over next day morning 6 am and Entries done in Database till 11:00 am.
eg. let say today is 6 sep 16 so night shift will over 6 am, 7 sep 16....
night shift entries till 11:00 am need to count in today date -1, as i given example like... for 7 sep , till 11 am, production will consider for 6 am...
Hope m clear here..
but at month end i need to take the production till month end 12:00 am only not next day morning till 11 am..
example: 31st Aug 16 entries done till 12:00 am need to consider in 31st Aug 16,
but Entries done after 12:00 am need to consider in 1 sep 16..
Kindly suggest
 
					
				
		
can you create a flag during dataload which shift the data belongs to?
you can use the flag for reporting shiftwise
for monthly reports you use your normal calendar
when you say that nightly shift can get new data upto 11:00 am, how doyou distinct this data from morning shift?
 
					
				
		
 abhaysingh
		
			abhaysingh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		i am using date and time stamp which is available in txn table,,
 Peter_Cammaert
		
			Peter_Cammaert
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can the night shift be identified by way of some characteristic, or do you want all entries until 11 am to be shifted back to the previous day?
In the latter case, the logic is rather simple. Imagine your DB table has a field [Posting DateTime] and you want to create a field [Corrected Posting DateTime] for reporting purposes, then you can use something like:
LOAD ...
IF ((Day([Posting DateTime]) <> 1) AND (Hour([Posting DateTime]) < 11),
DayEnd([Posting DateTime] - 1),
[Posting DateTime]) AS [Corrected Posting DateTime],
...
Peter
 
					
				
		
to get the flag you would define like this
if (Timefield>06:00 and Timefield<14:00, Morning,
if (Timefield>14:00 and Timefield<22:00, afternoon,
if (Timefield>22:00 and Timefield<06:00, night)) as Shift
once again: how do you distinguish that data from 10:00am belongs to night shift and not to morning shift or vice versa?
