0

Hi guys good day.

Ive create a pc time logger to detect the time-in, and to set timeout of the user. But i am having problem regarding on getting the time left value. Time out value will be the timein value plus 2 hours.Here is my code in Timer1.

dim timein,timeout,timeleft,addedtime as date
addedtime="02:00:00"

timein=format(TIME, "hh:mm:ss AM/PM")
timeout=TimeValue(timein) + TimeValue(addedtime)
timeleft=TimeValue(timeout)-Timevalue(Format(Time,"hh:mm:ss AM/PM) )

this works fine. But when timein is 11:00PM and the timeout will be 01:00AM, the time left will return 10:xx:xx which is wrong, it should return only 01:xx:xx since two hours after the login will be the time out.

Timer interval is set to 1000. Pls help guys..


Thanks for giving time & GOD bless us..

Edited by blocker: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by blocker
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.