0

Hi, I'm new to vb and I need to record the time the user used a certain privilege and the time s/he finished using it. i used date/time picker but whenever i run the program, i can't edit the time. only the date.

help please?

Edited by thirteen_xx: typographical error

3
Contributors
4
Replies
23
Views
4 Years
Discussion Span
Last Post by thirteen_xx
0

Something like this?

timePicker.Format = DateTimePickerFormat.Time;
timePicker.ShowUpDown = true;
0

You should use a timer instead of Date/time picker
when the user starts

Timer1.start()

when the user finishes

Timer1.stop()

but first you can set the time to seconds, minutes or hours
for seconds use

Timer1.Interval = 1000

now each timer Tick is a second, when the timer start log your time

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim LogTime As Integer = 0
        LogTime = LogTime + 1
    End Sub
0

i haven't typed codes in my program yet. i just added data sources

Edited by thirteen_xx: grammar

0

I got it now. Thank you so much! You are such a big help! THANK YOU!!! :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.