Free Windows Wallpaper

we give information and picture wallpaper : Windows XP, Nice Wallpaper XP, Windows 3D, Windows 7, Windows Desktop, Windows Natural XP and more

Mengkonversi jumlah detik menjadi sekian jam, sekian menit, sekian detik

By Djenar Siti

'Buat 1 Command button
'Buat 1 label
'buat 1 textbox
'truss copy deh coding ini ke dalam form code....

Private Sub Command1_Click()
Label1 = ConversiDetik(Me.Text1)
End Sub

Public Function ConversiDetik(ByVal detik As Long) As String

Dim Pdetik As Long
Dim Ldetik As Long
Dim LJam As Long
Dim Lmenit As Long
Dim Tdetik As Long
Pdetik = detik
Ldetik = Pdetik \ 86400
Pdetik = Pdetik - (Ldetik * 86400)
LJam = Pdetik \ 3600
Pdetik = Pdetik - (LJam * 3600)
Lmenit = Pdetik \ 60
Pdetik = Pdetik - (Lmenit * 60)
Tdetik = Pdetik
ConversiDetik = IIf(detik >= 86400, Ldetik & " hari ", vbNullString) & _
IIf(detik >= 0, Format(LJam, "0#") & ":", vbNullString) & _
Format(Lmenit, "0#") & ":" & Format(Tdetik, "0#")


End Function

'selamat mencoba...

No Comment

Post a Comment