N.B. inserisci un controllo timer (Timer1) e setta il suo intervallo a 1000 ed un controllo label (Label1)codice:Private Sub Timer1_Timer() Dim hh As Integer, mm As Integer, ss As Integer Dim dd As Integer, mo As Integer, yy As Integer Dim str As String str = Now() ' data odierna dd = Mid(str, 1, 2) ' giorno mo = Mid(str, 4, 2) ' mese yy = Mid(str, 7, 4) ' anno hh = Mid(str, 12, 2)' ore mm = Mid(str, 15, 2)' minuti ss = Mid(str, 18, 2)' secondi Label1.Caption = dd & "/" & mo & "/" & yy & " - " & hh & ":" & mm & ":" & ss End Sub

Rispondi quotando