Selasa, 14 November 2023

Re: [MSAccessProfessionals] Return records less than 2 years from CurrentDate

How about a criteria of:

< DateAdd("yyyy", -2,Date())

Paul


------ Original Message ------
From "Jim Wagner" <josephwagner2@outlook.com>
Date 11/14/2023 10:59:46 AM
Subject [MSAccessProfessionals] Return records less than 2 years from CurrentDate

Hello all,
I have a dataset that is 17k records. A field named Effdt has dates back to 1968. I would like to create a query that returns the records from 1968 to 2 years from the current date. So, if the current date is today, I would like to only see records less than 11/14/2021. Users only need on a daily basis records that are 2 years old, but there are times that they would need data that is beyond the current date. I thought I could join the two datasets to get the records desired when needed. My issue is that the current date is moving daily. Is there a way to get the dataset needed?

Thank You

Jim Wagner

Tidak ada komentar:

Posting Komentar