Hi every one i need help in extracting parts of time like Hours , Minutes , Seconds and Milliseconds
here is what i tried but it jus give a zero "0" result i want it to display the hour. But actually i want it to extract HOURS, MINUTES , SECONDS individually so as to manipulate the values
Public Class Form1
Private Sub btngenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngenerate.Click
Dim h, m, s As Integer
Dim str As String
Dim dt As Date
str = dt.TimeOfDay.Hours
txtname.Text = str
End Sub
End Class
here is what i tried but it jus give a zero "0" result i want it to display the hour. But actually i want it to extract HOURS, MINUTES , SECONDS individually so as to manipulate the values
Public Class Form1
Private Sub btngenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngenerate.Click
Dim h, m, s As Integer
Dim str As String
Dim dt As Date
str = dt.TimeOfDay.Hours
txtname.Text = str
End Sub
End Class