hi
I have got a table for internet accesswith user ID, it has 3 column user ID, starttime and endtime, i want to make another column which will show how many mins or hours that user was logged in to the internet. can anyone please help me...
thanks
kaz
kazitula
0
Newbie Poster
Recommended Answers
Jump to Posti wouldn't suggest adding an additional column necessarily, but creating a view, that way, your duration will always be in sync with the columns
select USER_ID, START_TIME, END_TIME, DATE_DIFF(second, START_TIME, END-TIME) AS DURATION_SEC FROM InternetAccess
depending on what you need, you can sub in minute, hour, or …
All 3 Replies
Reply to this topic
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.