TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
s c
NA
14
0
get the number of hours between two textboxes
Jul 18 2008 6:52 PM
Hi all,
This is my second post here, last time Alan was a STAR and solved it straight away - THANKS again if your reading :-)
I need some help again, this time to get the number of hours between two textboxes.
IE: i have two textboxes on a form .
LoggedIn.text
Loggedout.text
What i want to do is calculate the number of hours difference between loggedin.text and loggedout.text.
I can do this if i enter in loggedin.text: 07:00 am and in LoggedOut.text 12:00 pm - it will give me 5 hrs no problem but i need it for a timesheet and the user may start at 9pm and finish at 5am the following day and when i put these values in i get -hrs.
I presume i need to add the date somehow to each value first (07/08/2008 9:00 pm) and (08/08/2008 05:30 am) but how do i get the number of hours and minutes in the difference?
Any help with code would be greatly appreciated. If you need any further info then please let me know.
BTW, i am using vb.net 2008 (vb not C#)
Thanks in advance.
Reply
Answers (
11
)
Http 502 and 503 errors
passing arguments to main function