T travismp Registered User. Local time Today, 09:02 Joined Oct 15, 2001 Messages 386 Apr 24, 2007 #1 I searched but could not find a simple answer. I want to see all results from last month for [TestDate] Month(Date())-1) ? ? ? ? ? ? ?
I searched but could not find a simple answer. I want to see all results from last month for [TestDate] Month(Date())-1) ? ? ? ? ? ? ?
T travismp Registered User. Local time Today, 09:02 Joined Oct 15, 2001 Messages 386 Apr 24, 2007 #2 I found this on a microsft page Year([TestDate])*12+DatePart("m",[TestDate])=Year(Date())*12+DatePart("m",Date())-1 that is a beast. Does anyone have something better? If not this will work. I just thought I saw something much more simple a couple years back. Thanks.
I found this on a microsft page Year([TestDate])*12+DatePart("m",[TestDate])=Year(Date())*12+DatePart("m",Date())-1 that is a beast. Does anyone have something better? If not this will work. I just thought I saw something much more simple a couple years back. Thanks.
J Jon K Registered User. Local time Today, 09:02 Joined May 22, 2002 Messages 2,209 Apr 25, 2007 #3 Alternatively, you can use this criteria for the [TestDate] field:- Between DateSerial(Year(Date()), Month(Date()) - 1, 1) And DateSerial(Year(Date()), Month(Date()), 0) That is, between the first day and the last day of the previous month. .
Alternatively, you can use this criteria for the [TestDate] field:- Between DateSerial(Year(Date()), Month(Date()) - 1, 1) And DateSerial(Year(Date()), Month(Date()), 0) That is, between the first day and the last day of the previous month. .
R raskew AWF VIP Local time Today, 03:02 Joined Jun 2, 2001 Messages 2,731 Apr 25, 2007 #4 Hi - Try this as the criteria for your date field: Code: Between DateSerial(Year(Date()),Month(Date())-1,1) And DateSerial(Year(Date()),Month(Date()),0) HTH - Bob
Hi - Try this as the criteria for your date field: Code: Between DateSerial(Year(Date()),Month(Date())-1,1) And DateSerial(Year(Date()),Month(Date()),0) HTH - Bob