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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -