Giuseppe Iannacone Posted November 7, 2019 Posted November 7, 2019 Can you please provide me a dinamic sintax solution for a widget to get the data of quarter 3 I'm using this sintax, but has to be adjusted every year! (h_status != 'status.cancelled' AND h_status != 'status.closed') AND (h_requesttype = 'Incident' OR h_requesttype = 'Service Request' ) AND (h_datelogged>='19/07/01' AND h_datelogged<='19/10/01' ) AND h_fk_team_name = 'Infrastructure'
Guest Chaz Posted November 8, 2019 Posted November 8, 2019 @Giuseppe Iannacone instead of explicitly typing the dates, you can define the current year in your query instead: h_datelogged BETWEEN CONCAT(YEAR(CURDATE()),'-01-01') AND CONCAT(YEAR(CURDATE()),'-12-31')
Giuseppe Iannacone Posted November 8, 2019 Author Posted November 8, 2019 1 hour ago, Chaz said: @Giuseppe Iannacone instead of explicitly typing the dates, you can define the current year in your query instead: h_datelogged BETWEEN CONCAT(YEAR(CURDATE()),'-01-01') AND CONCAT(YEAR(CURDATE()),'-12-31') thank you Chaz, so for a specific quarter i may have '-07-01' and '-10-01' for quarter 3 for example, right?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now