6 month prior

  • Thread starter Thread starter Miskacee
  • Start date Start date
M

Miskacee

I have looked on the knowledge base and can't quite find my answer. I need
to go back 6 months from the current date - a rolling date. For example, in
feb I need to show all of the records from August until now. In March I need
to see all of those dates from Sept until current.

Thank you !
 
Do you want the entire month or starting at a specific day of the month.
You should be able to create your criteria using DateSerial() and DateAdd()
like
Between DateAdd("m",-6, Date()) and Date()
 
I saw this on a post from a while back...

Use the DateSerial function.
DateSerial(Year(Date()), Month(Date()) -6, 1)) < -- First Day of Current Month

Last day of the month? That's
DateSerial(Year(Date()),Month(Date()),0) < -- Last Day of Current Month

Regards,
Ryan---
 
i'm not quite there. I entered : Between DateAdd("m",-6, Date()) and Date()

which shows me the month 6 months ago but i need a rolling date
configuration. I need to show the month 6 months ago from the current month
and then 6 months prior to that 6th month date.

So for this month, I need to show 6 months ago - July and then 6 months
prior to July - - a 12 month rolling period starting at 6 months prior to
this month.
Sorry, I didn't explain all of the way.
 
I rarely limit a query like this to a specific time period. Consider creating
a form with a couple text box that allow a user to enter or select start and
end months/dates. You can set the defaults to the first of a month six months
ago or a year ago or whatever. You will have the freedom and flexibility to
choose whatever period you want or accept the default.

If you are opening a report or form, you can use the Where Condition of the
DoCmd.Open... method.
 
That isn't possible. I'm using this for a report that automatically selects
6 months prior to this month and then the previous 6 months from that date.
Leadership team wants it to be automatic.

I just need the months to automatically show on the report. I have the
report finished but now we want to only show 6 months prior and then the 6
months prior to that.

Any suggestions?
Thanks for your help.
 
i'm not quite there. I entered : Between DateAdd("m",-6, Date()) and Date()

which shows me the month 6 months ago but i need a rolling date
configuration. I need to show the month 6 months ago from the current month
and then 6 months prior to that 6th month date.

So for this month, I need to show 6 months ago - July and then 6 months
prior to July - - a 12 month rolling period starting at 6 months prior to
this month.
Sorry, I didn't explain all of the way.

I'm still confused. It sounds like you are talking about a 12-month rolling
date, from 12 months ago to today (centered on the date six months ago today).
Do you want two separate reports, one for July-December and another for
January-July?

And do you want six months to the day, or six calendar months, from July 1
through December 31 and from January 1 (2008) through June 30?
 
six months from current month and then 6 months prior to 6 months (through
December 31 and from January 1 (2008) through June 30? - yes
 
six months from current month and then 6 months prior to 6 months
(through December 31 and from January 1 (2008) through June 30? - yes

I'm sure you think this statement makes sense, but it looks like
gibberish to me.

It sounds like you want dates that are between 18 months ago and 6 months
ago. That would be...

BETWEEN DateAdd("m", -18, Date()) AND DateAdd("m", -6, Date())
 
PERFECT!!!! I changed it to :
Between DateAdd("m",-12,Date()) And DateAdd("m",-6,Date()) - this is what I
was looking for.

Thank you sooooo much!!!!
Do you mind looking at my other question regarding multiselect? - you
probabaly know this answer also.
 
Between DateAdd("m",-12,Date()) And DateAdd("m",-6,Date()) - this is what I
was looking for.

Please reread your prior posts, with your mind clear of your own knowledge of
the problem, and see if *anyone* could possibly have deduced that without the
aid of telepathy.
 
Back
Top