我有值的數據庫樣品如何從兩個月的日期找到剩餘日期?
Leave FromDate ToDate EmpCode
6 2015-01-28 2015-02-02 ABC
我想= 4休假數在2015年1月,離開數= 2在2015年2月 有人幫我...
eg: You applied 4 days leave 2015-01-30 to 2015-02-02. And the end of the
month your company decide to check your January month leave. They just
entered month=1 and year=2015. Then how to get count of January month leaves from these data???
或
If have a date "2015-01-25", then how can I display the remains dates ie,
2015-01-26,2015-01-27,2015-01-28, 2015-01-29,2015-01-30,2015-01-31 etc.
哪個數據庫? – 2015-02-07 06:40:38
你應該嘗試一下你的邏輯。然後你可以發佈你的代碼,這會給你任何問題。另外,你的問題是一種悖論,因爲你沒有提到如何決定哪一個月有多少葉? – 2015-02-07 06:42:20
@MohanLal哪個數據庫? 'sqlserver'或'mysql'在後臺 – 2015-02-07 06:43:50