I am really struggling with the following and was wondering where I am going wrong. I have a MySQL database. User log in and the time in is stored as a time value in the database. So when the user logs out I get a total time by subtracting the in and out times and it is saved as a time field in the database.
That is working no problem. Now the problem is that I want to calculate the time spent and get the hour fraction. That means is a user was in for 10 minutes it must give me 0.10 and 15 minutes would be 0.15. I have managed to get the result in a test with Hourspan and a TDateTimePicker value but when I try the same with my database data I dont get any usable data.
That is working no problem. Now the problem is that I want to calculate the time spent and get the hour fraction. That means is a user was in for 10 minutes it must give me 0.10 and 15 minutes would be 0.15. I have managed to get the result in a test with Hourspan and a TDateTimePicker value but when I try the same with my database data I dont get any usable data.