Jump to content

Recommended Posts

Posted

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

Posted (edited)

shouldn't it be SUBDATE(current_date, INTERVAL 1 DAY)

Regards

Doug

Edited by DougA
used MS Sql
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...