Hi guys here is my coode:
SELECT SUM(DATEDIFF(L_End, L_Start)), L_Start,L_End
FROM leave_table
where ID_No = '9283158370' and L_Status = 'Approve' and L_Type ='Sick'
That is working but my dilemma is what if the start and end date are the same, like for example start date is 2015-03-10 and end date is also 2015-03-10. If I query that in the DATEDIFF function the difference is 0. What I would like to is date diff is equal to 1. Since It the start and the end date is 1 day.