Dim tgl As Date = CDate("1/1/" & CStr(Now.Year + 1))
Dim daydiff As Integer = DateDiff(DateInterval.Day, Now, tgl)
Dim hrsdiff As Integer = DateDiff(DateInterval.Hour, Now, tgl)
Dim mntdiff As Integer = DateDiff(DateInterval.Minute, Now, tgl)
Dim secdiff As Integer = DateDiff(DateInterval.Second, Now, tgl)
Label1.Text = daydiff & " days, " & _
hrsdiff Mod daydiff & " hr, " & _
mntdiff Mod hrsdiff & " min " & _
Format(secdiff Mod mntdiff, "00") & " sec "
Selamat mencoba.
Tidak ada komentar:
Posting Komentar