
[code]I'm trying to explain with the sample data....
Check the below input & output data....
Input is of Employee's attendance data... First four rows is for 1st Jan,2013 and last 2 rows for 2nd Jan, 2013..
--INPUT
EID Date CheckTime CheckType
26359 2013-01-01 2013-01-01 09:50:00.000 IN
26359 2013-01-01 2013-01-01 11:47:00.000 OUT
26359 2013-01-01 2013-01-01 17:21:00.000 IN
26359 2013-01-01 2013-01-01 18:40:00.000 OUT
26359 2013-01-02 2013-01-02 09:40:00.000 IN
26359 2013-01-02 2013-01-02 18:55:00.000 OUT
-- To produce Checkin & CheckOut timings and also duration of IN time of a employee based on CheckTime column & CheckType
eid date timein timeout DurationInMinutes
26359 2013-01-01 2013-01-01 09:50:00.000 2013-01-01 11:47:00.000 117
26359 2013-01-01 2013-01-01 17:21:00.000 2013-01-01 18:40:00.000 79
26359 2013-01-02 2013-01-02 09:40:00.000 2013-01-02 18:55:00.000 555[/code]
Did you got the purpose of the above query? If yes please mark as Answer
Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif
Cibin, if this helps please login to Mark As Answer. | Alert Moderator