Brian Jorgenson wrote:
I am looking for a formula to put in my query to pull data based on
the last 3 months. It starts with the current day and will go back 3
months.
Here is my wrkflow language for example:
CURRENT_DATE = current date
PAST_DATE = CURRENT_DATE - 3 months
SELECT RANGE PAST_DATE to CURRENT_DATE
END
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
SELECT *
FROM TableName
WHERE DateColumn BETWEEN DateAdd("m", -3, Date()) And Date()
DateAdd:
"m" = use months as the interval
-3 = interval to "add" to indicated date
Date() = indicated date (current date)
See the Access VBA Help article on DateAdd() Function and Date()
function.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQHWkYoechKqOuFEgEQISoQCfcME2PJHqxhp7TxQn80a+gH qP0Q0An2SW
TEl6Q5hPL17i/tayY1RBcqtJ
=Nd4f
-----END PGP SIGNATURE-----