« first day (2692 days earlier)      last day (2180 days later) » 

1:51 AM
@ypercubeᵀᴹ cheers, 'fixed' it
 
 
9 hours later…
10:39 AM
@James I don't particularly like the use of isnull() there but you got my upvote, for the date check alone. Seems that no one else of the answerers had that (common sense).
It would seem a very weird design if there was only one in/out per worker and not one per day.
Not that we haven't seen weird designs in the site!
 
=]
 
10:55 AM
Maybe they have a table per day
 

« first day (2692 days earlier)      last day (2180 days later) »