Dim HE1 As Variant
Dim HS1 As Variant
Dim HE2 As Variant
Dim HS2 As Variant
'1er Turno:
Dim HEA1 As Variant 'Hora Entrada "Asignada" del Empleado (1er Turno)
Dim HSA1 As Variant 'Hora Salida "Asignada" del Empleado (1er Turno)
'2do Turno:
Dim HEA2 As Variant 'Hora Entrada "Asignada" del Empleado (2do Turno)
Dim HSA2 As Variant 'Hora Salida "Asignada" del Empleado (2do Turno)
Dim HrLOTD1 As Variant
Dim HrLOTD2 As Variant
Dim HrLOTN1 As Variant
Dim HrLOTN2 As Variant
'LOT: Ley Organica del Trabajo (Jornada Laboral Diurna)
HrLOTD1 = "5:00:00 AM" & " " & dtpHED1.Value
HrLOTD2 = "7:00:00 PM" & " " & dtpHSD1.Value
'LOT: Ley Organica del Trabajo (Jornada Laboral Nocturna)
HrLOTN1 = "7:00:00 PM" & " " & dtpHEN1.Value
HrLOTN2 = "5:00:00 AM" & " " & CDate(Date) + 1 'La Fecha de hoy más 1 dia más, (siguiente dia)
'LAS SENTENCIAS IF:
If Format(CDate(HS1), "dd-mmmm-yyyy hh:mm:ss AM/PM") >= Format(CDate(HrLOTN1), "dd-mmmm-yyyy hh:mm:ss AM/PM") _
And _
Format(CDate(HSA1), "dd-mmmm-yyyy hh:mm:ss AM/PM") <= Format(CDate(HrLOTN2), "dd-mmmm-yyyy hh:mm:ss AM/PM") Then
HrsExtraN1 = HrsExtSal1
LbTotalHrsExtN.Caption = HrsExtraN1
Else
HrsExtraN1 = 0
LbTotalHrsExtN.Caption = HrsExtraN1
End If