Nick55 Posted January 4, 2017 Posted January 4, 2017 Hi, I'm creating some widgets, Id like to view tickets logged yesterday. Today is current_date Should yesterday be something like subdate(current_Date, 1) ? Cant seem to get this to work. Thanks
DougA Posted January 4, 2017 Posted January 4, 2017 (edited) shouldn't it be SUBDATE(current_date, INTERVAL 1 DAY) Regards Doug Edited January 4, 2017 by DougA used MS Sql
Guest Posted January 4, 2017 Posted January 4, 2017 Hi @Nick55 There are various ways of doing it, but to use the example that you gave, you could try: h_datelogged >= subdate(current_date, 1) and h_datelogged < subdate(current_date,0) I've tested this and it appears to bring back the correct number of results based on the requests I logged yesterday. Hope this helps Bob
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