If xSchedule.ntotalhour < 0 Then ' **************************************** ' * Aucune cédule pour la journée ' **************************************** ' Cédule par défault: 7H00 à 15h30 Dim dShiftDefaultBegin As DateTime = New DateTime(Now.Year, Now.Month, Now.Day, 7, 0, 0) xPunch.dpunchinrnd = dShiftDefaultBegin.ToString Dim dShiftDefaultEnd As DateTime = New DateTime(Now.Year, Now.Month, Now.Day, 15, 30, 0) xPunch.dpunchoutrnd = dShiftDefaultEnd.ToString End If
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionOption Explicit On Public Class Form1 Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim debut As DateTime = Today & " 07:00:00" Dim fin As DateTime = Today & " 15:30:00" Dim SS As Integer = DateDiff(DateInterval.Second, debut, fin) Dim HH As Integer = SS \ 3600 SS = SS - (HH * 3600) Dim MN As Integer = SS \ 60 SS = SS - (MN * 60) MsgBox(debut & vbLf & fin & vbLf & HH & vbLf & MN & vbLf & SS) End Sub End Class