salve a tutti vorrei fare una differenza di date..
codice:
Private Sub Command1_Click()
Dim Giorno1 As Integer
Dim Mese1 As Integer
Dim Anno1 As Integer
Dim Giorno2 As Integer
Dim Mese2 As Integer
Dim Anno2 As Integer
Dim Giorni As Integer
Dim Anni As Integer
Dim TotaleGiorni As Integer
Dim diffdate As Integer
Giorno1 = Txt_Giorno1
Mese1 = Txt_Mese1
Anno1 = Txt_Anno1
Giorno2 = Txt_Giorno2
Mese2 = Txt_Mese2
Anno2 = Txt_Anno2
Dim datTim1 As Date
Dim datTim2 As Date
datTim1 = CDate(Anno1 & "-" & Mese1 & "-" & Giorno1)
datTim2 = CDate(Anno2 & "-" & Mese2 & "-" & Giorno2)
Dim GiorniMancanti As Long
GiorniMancanti1 = DateDiff("d", datTim1, datTim2)
lbl_GM = GiorniMancanti1
End Sub
però mi restituisce il valore in giorni..
non è possibile farlo anni giorni mesi...???
se sapete un modo per ottimizzare lo spazio.. ditelo pure.. xd