Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day dear programmers, i want to compute 1 column from another, because im developing a attendance system, and what i want to make is compute the difference between Column Time in and Column Time out, i want to put the answer to another column respectively Example:


col_time_in
2013-12-16 10:41:00
2013-12-17 8:00:00
2013-12-18 7:30:00
2013-12-19 9:35:00
2013-12-20 10:16:00

col_time_out
2013-12-16 17:00:00
2013-12-17 14:20:00
2013-12-18 15:30:00
2013-12-19 17:15:00
2013-12-20 17:20:00

I would like to compute all content of col_time_in and col_time_out to get their time difference
and all the answer will be redirected to col_totaltime, how can i possibly do that, compute all the content respectively at the same time anyone knows?

thanks :)
Posted
Comments
H.Brydon 1-Feb-14 15:09pm    
This looks a lot like homework, which is not the purpose of this forum. I am surprised that you already got a couple of responses.

It's very simple instead of asking such questions try to google out and get some answers it will help you throughout your development career

Here is 1 of many of link

http://stackoverflow.com/questions/17278791/computed-column-specification-in-sql-server-time-difference-in-hours-or-minute[^]
 
Share this answer
 
check this similar question
http://forums.asp.net/t/1188751.aspx[^]
 
Share this answer
 

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