Forum Discussion
Tony2021
Sep 10, 2024Iron Contributor
DateDiff with a Where Clause
Hello Experts, I am trying to use a DateDiff to find the day count between 2 dates. I need a Where Clause (blue part) I am getting a #error though. I am not sure if the where clause below is...
- Sep 11, 2024
Hi,
No matter how you formulate your WHERE statement, the DateDiff function does not have a WHERE part/argument. You therefore need a different approach.
Perhaps a DLookUp with WHERE argument would help you to determine the first comparison value, but that would not be very performant.
For more specific help, we would need a more detailed description.
Servus
Karl
****************
Access Forever News DevCon
Access-Entwickler-Konferenz AEK - 19./20.10. Nürnberg
George_Hepworth
Sep 11, 2024Silver Contributor
It's harder to offer suggestions on a partial SQL statement. Perhaps you can post the entire SQL from the query. The part that is shown doesn't appear to be valid SQL, but in isolation, I might be missing something. Rather than guess wrong, though, I'd rather see the entire query.
Thank you.
Thank you.