Hi All,
I have a query that is pulling production data from a database.
I want to pull current shift information, so basically I need to have a variable that would tell the query what shift it is based on what the current time is.
I was thinking of a something like the following:
Then my query would use CShift to pull the current data.
Any ideas on how to really code this?
mot98
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)
"Is it friday yet?"
I have a query that is pulling production data from a database.
I want to pull current shift information, so basically I need to have a variable that would tell the query what shift it is based on what the current time is.
I was thinking of a something like the following:
Code:
If Time() is Between 23:00 and 07:00 then CShift = 1
ElseIf
Time() is Between 07:00 and 15:00 then CShift = 2
ElseIf
Time() is Between 15:00 and 23:00 then CShift = 3
Then my query would use CShift to pull the current data.
Any ideas on how to really code this?
mot98
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)
"Is it friday yet?"