0
I need to collect registered orders from a table with the name Pedidostalao in the last 30 days.
0
I need to collect registered orders from a table with the name Pedidostalao in the last 30 days.
0
In your query, use the expression SomData()
(or DateAdd()
in Access in English) as a criterion in the column of the following date form:
>= SomData("d"; -30; Data() )
He makes a WHERE
field returning all the dates of the last 30 days.
The field type should be Data
Obg for the tips +gmsantos, and I solved like this: SELECT pt.id as Pedidos, pt.Data FROM (Pedidostalao pt INNER JOIN Sub ON pt.ID = sub.Idrequest) INNER JOIN Customers cli ON cli.Code = en.Client WHERE cdate(format(en.Date,'mm/dd/yyyy')) between Date() - 30 and Date() ORDER BY 1 DESC
Browser other questions tagged sql ms-access
You are not signed in. Login or sign up in order to post.
Welcome to Stack Overflow! Please include more information to clarify your question, such as your table fields, previous attempts, etc. Visit the [Ask] page for more information.
– gmsantos