c# - Check that a given date does lie between two existing dates inside a datatable -
i have 1 table can store employee leave start date , end date so:
employeeid managerid leavestartdate leaveenddate isapproved 1 14 10/02/2014 15/02/2014 approved 4 17 10/02/2014 12/02/2014 rejected
i need check when manager login employee on leave? if yes manager can assign employees work other employee.for have check wheather current system time lies between leavestartdate , leaveenddate.how can ?
if wanna filter isapprved try this.
select * tblemployeeleaves date(getdate()) between leavestartdate , leaveenddate , isapproved='approved'
Comments
Post a Comment