Welcome Guest, Not a member yet? Register   Sign In
How to show date rows equals current date?
#5

@jelz2018,

Combining them isn't the problem. I noticed in your example image that you had a date of 11-13, that is going to be a problem. I do have a suggestion for the rest. Here you go.

Assuming that you have access to MySQL directly try testing this first (to make sure it works):
select DATE(concat(year,'-',month,'-',multiple)) as CombinedDate from ats_leave_apps

If it works (it will not work for the records that have a date range) then try this:
select COUNT(employee_id) AS count FROM ats_leave_apps WHERE DATE(concat(year,'-',month,'-',multiple)) = CURDATE()")

The next issue that you will have will be the multiple column. You will need to determine how you wish to handle date ranges. You can create a if condition to determine what value should represent the date. Once you determine how you want to handle it let me know and I can probably give you a suggestion.
Reply


Messages In This Thread
RE: How to show date rows equals current date? - by php_rocs - 03-02-2019, 07:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB