GetEventStartTimeForAShift Method (LaborExec)
- Last UpdatedNov 06, 2025
- 2 minute read
The GetEventStartTimeForAShift() method retrieves the event start time of the last labor event that occurred on a shift on the specified entity.
'Declaration
Public Shared Sub GetEventStartTimeForAShift( _
ByVal userId As String, _
ByVal entId As Integer, _
ByVal shiftStartTime As Nullable(Of Date), _
ByVal usePreviousShift As Nullable(Of Boolean), _
ByRef laborStartTime As Date _
)
'Usage
Dim userId As String
Dim entId As Integer
Dim shiftStartTime As Nullable(Of Date)
Dim usePreviousShift As Nullable(Of Boolean)
Dim laborStartTime As Date
LaborExec.GetEventStartTimeForAShift(userId, entId, shiftStartTime, usePreviousShift, laborStartTime)
public static void GetEventStartTimeForAShift(
string userId,
int entId,
Nullable<DateTime> shiftStartTime,
Nullable<bool> usePreviousShift,
out DateTime laborStartTime
)
Parameters
- userId
- Required. Holds the ID of the user associated with the labor event.
- entId
- Required. Holds the ID of the entity.
- shiftStartTime
- Optional. Holds the shift start time to identify the shift. To not specify a shift start time, pass a null.
- usePreviousShift
- Optional. Holds a flag that, if set to true, specifies that the labor event will be the last one to occur in the shift immediately previous to the current shift.
- laborStartTime
Output. Holds the returned start time of the last labor event that occurred in the specified shift. If no labor events are found for that shift, a null value is returned.
This method returns the event_start_time from the last labor event that occurred on the supplied shift start time for the specified user.
- If the supplied shift start time is null, then the method returns the event start time from the last labor event that occurred on the current shift is returned.
- If the optional usePreviousShift is set to true, then the method retrieves the event start time from the last labor event that occurred on the shift that is immediately preceding the current shift that is running on the supplied entity.