Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to calculate earliest login time and latest logout time in vb.net or c# program
Posted
Comments
Amol_B 17-Jun-13 1:22am    
Please elaborate your question.

1 solution

You put SQL in your tags, so I assume you have an SQL database with the log in and log out times in it (I know, it's a biug assumption, but be fair, you really didn't give us much to go on!)

Select min(LogInTime) , max (logOutTime) from whatevertablethedataison;

would give you what you want.
 
Share this answer
 
Comments
rajkumar_k88 17-Jun-13 5:22am    
time values cannot accept aggregate functions.........
_Maxxx_ 17-Jun-13 6:11am    
Yes they can - can you tell us what the data types are on your table and show the SQL you are using, and the error message you are getting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900