Subtract 18 months from today's date

Hi,
I am working with a DOS program that is extracting data from a GoldMine dBase IV program with Boolean Expressions. I need to archive history for the last 18 months from today's date.  We are able to use the Year function for going back 2 years, but now we need to be able to extract data in monthly increments.

Do you know what Boolean expression I would use?

This is the 2 year expression that we are successful with.

Conthist->Createon<=(AddYears(-2,Date()))

Your assistance is greatly appreciated!

Kimster1991
Kimster1991Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
NetminderConnect With a Mentor Commented:
Closed, 500 points refunded.
Netminder
Site Admin
0
 
rockiroadsCommented:
Taking a guess, is there AddMonths?

0
 
Kimster1991Author Commented:
LOL..no. Tried AddMonth and AddMonths..neither are valid boolean expressions.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
jrb1Commented:
how about this:

Conthist->Createon<=(AddYears(-2,Add6Month(Date())))
0
 
rockiroadsCommented:
I found this site, dont know if it applies to you though
http://www.redstonesoftbase.com/index_000001.htm

I cant see anything with months
0
 
Kimster1991Author Commented:
There is no AddMonth function. I will try jrb1's ...but if it won't add months in the beginning, not sure why it would add in the middle of the expression.

Yes, Redstone is the developer and I have an email in to Dave for assistance as well. Any other suggestions?
0
 
rockiroadsCommented:
Curse the damn product for not having the flexibility

But I guess you've already tried that one! :)
0
 
jrb1Commented:
That's the syntax of the AddMonth function:

http://www.redstonesoftbase.com/index_000001.htm

Add1Month
Advance a Date {x} true MONTHs
0
 
jrb1Commented:
(assuming it applies)
0
 
Kimster1991Author Commented:
You guys are dolls for attempting to help me on this! I really did need to get this resolved today. Dave provided me with the following:

Examples assume Conthist->Ondate, and that it is today's date.  This would be all, or part of, your Filter:
 
FirstOfMon(Conthist->Ondate, -12)
Result: 07/01/2005
 
FirstOfMon(Conthist->Ondate, -18)
Result: 01/01/2005
 
FirstOfMon(Conthist->Ondate, -24)
Result: 07/01/2004
 
Addendum:
 
The actual Filter might be:
 
Conthist->Ondate < FirstOfMon(Conthist->Ondate, -24)
 
And you'd run them biggest to smallest, if they want these as 3 separate data sets.  Otherwise, if you ran -12 first, that would pick up ALL of them (everything less than a year ago).
 
This is compliments of Dave Petonic, Developer and GoldBox God...

Thanks all!

Kimster
0
 
Kimster1991Author Commented:
Uh...hmmm...how do I close this question out now?
0
 
rockiroadsCommented:
Nice, your sorted!

Post a question in community support asking them to close this. You will get a refund in points
I dont recommend you request delete as your info may be of some use to other people

0
 
Kimster1991Author Commented:
Thanks Rockroads. I have asked them to close it but to leave it up for others. Appreciate the help on getting it closed!
0
 
rockiroadsCommented:
Please close instead of delete, the information here may prove useful to someone

0
 
jrb1Commented:
that's fine
0
All Courses

From novice to tech pro — start learning today.