in my work i get 03:00:00 as the total hours work..how can i make it in just 3?

Dim TimeOutHours = TimeSpan.FromHours(Val(DateTime.Parse(TimeOfDay.ToString(Me.TimeOutTextBox.Text.Trim)).Hour))
    Dim TimeInHours = TimeSpan.FromHours(Val(DateTime.Parse(TimeOfDay.ToString(Me.TimeInTextBox.Text.Trim)).Hour))

    Dim TimeOutMins As Integer = (Val(DateTime.Parse(TimeOfDay.ToString(TimeOutTextBox.Text)).Minute))
    Dim TimeInMins As Integer = (Val(DateTime.Parse(TimeOfDay.ToString(TimeInTextBox.Text)).Minute))

    Dim mingreat As TimeSpan = TimeOutHours.Subtract(TimeInHours).Subtract(TimeSpan.FromHours(1))
    Dim minless As TimeSpan = TimeOutHours.Subtract(TimeInHours)
    TotalHWTextBox.Text = minless.ToString

Change
Dim minless As TimeSpan = TimeOutHours.Subtract(TimeInHours)
to
Dim minless As Integer = CINT(TimeOutHours.Subtract(TimeInHours))

Dim minless As TimeSpan = TimeOutHours.Subtract(TimeInHours)
TotalHWTextBox.Text = minless.Hours.ToString()

thanks for answering:) it helped me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.