gradinumcp
IS-IT--Management
Hi there! I am trying to get a report for the current year. So i thought:
(1) I could get Today's Date from the computer clock
(2) Get the year from it.
(3) Then in my SQL database "DateStamp" column, check if the Datestamp has Date Like the year from the clock.
I dont know if this logic makes sense or is there an easy way to get the year's report until the end of the year and once the new year starts, it should show data for the next year.
Here's my sql query:
mysql="SELECT SUM(LeaveHours)/60 AS SUM FROM TimeReport WHERE UserID='911' and LeaveType='Vacation' and DateStamp LIKE '%Year()%'"
What kind of code will go in place of the red code???
(1) I could get Today's Date from the computer clock
(2) Get the year from it.
(3) Then in my SQL database "DateStamp" column, check if the Datestamp has Date Like the year from the clock.
I dont know if this logic makes sense or is there an easy way to get the year's report until the end of the year and once the new year starts, it should show data for the next year.
Here's my sql query:
mysql="SELECT SUM(LeaveHours)/60 AS SUM FROM TimeReport WHERE UserID='911' and LeaveType='Vacation' and DateStamp LIKE '%Year()%'"
What kind of code will go in place of the red code???