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

splitting yesterday DateTime field into shifts

Status
Not open for further replies.

saltcoats

Technical User
Apr 17, 2004
17
US
I am trying to create a report on CE10 on a DateTime field.
I would like to schedule a Crosstab report today that would capture workorders completed yesterday. I have grouped the Rows into the different Trades and the columns into shifts
i.e.
12am to 8am shift A
8 am to 4 pm shift B
4 pm to 12 pm shift C

I normally just schedule the report at a suitable time using CurrentDateTime -1 to CurrentDateTime functions but there is so much activity on the server at that time it runs slowly and misses some data.

Any help would be appreciated.
 
I think you could just use a record selection formula of:

{table.datetime} = currentdate-1

At least you can do that in CR XI without handling the time and still get the correct result.

-LB
 
Thanks,
I still have the problem of splitting out the times to group the shifts

gpk
 
I thought you said you already that done. Use a formula like:

if time({table.datetime}) in time(0,0,0) to time(7,59,59) then "Shift A" else
if time({table.datetime}) in time(8,0,0) to time(15,59,59) then "Shift B" else
if time({table.datetime}) in time(16,0,0) to time(23,59,59) then "Shift C"

Use this as the column field in your crosstab.

-LB
 
Thanks,
this is excatly what I want, sorry for the confusion. I didn't say it but I previously just subtracted from the current dateTime to get the shift.

Thanks again
gpk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top