Sample Query Using the Current Date
Suppose you want to find all jobs with a start date in the past week. From the Job Orders form, use a query that includes the CURDATE keyword, like this:
Start < CURDATE(1) AND Start > CURDATE(-8)
CURDATE() with no parameters returns just the date with no time component. CURDATE(30) represents the current date plus 30 days, and CURDATE(-30) represents 30 days in the past.
Related topics