Solved

Subtract 18 months from today's date

Posted on 2006-07-14
17
831 Views
Last Modified: 2006-11-18
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
0
Comment
Question by:Kimster1991
  • 5
  • 5
  • 4
  • +1
17 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 17110949
Taking a guess, is there AddMonths?

0
 

Author Comment

by:Kimster1991
ID: 17110964
LOL..no. Tried AddMonth and AddMonths..neither are valid boolean expressions.
0
 
LVL 25

Expert Comment

by:jrb1
ID: 17111103
how about this:

Conthist->Createon<=(AddYears(-2,Add6Month(Date())))
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17111226
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
 

Author Comment

by:Kimster1991
ID: 17111304
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 17111330
Curse the damn product for not having the flexibility

But I guess you've already tried that one! :)
0
 
LVL 25

Expert Comment

by:jrb1
ID: 17111563
That's the syntax of the AddMonth function:

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

Add1Month
Advance a Date {x} true MONTHs
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 25

Expert Comment

by:jrb1
ID: 17111566
(assuming it applies)
0
 

Author Comment

by:Kimster1991
ID: 17111826
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
 

Author Comment

by:Kimster1991
ID: 17111834
Uh...hmmm...how do I close this question out now?
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17111849
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
 

Author Comment

by:Kimster1991
ID: 17111961
Thanks Rockroads. I have asked them to close it but to leave it up for others. Appreciate the help on getting it closed!
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17117976
Please close instead of delete, the information here may prove useful to someone

0
 
LVL 25

Expert Comment

by:jrb1
ID: 17118717
that's fine
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 17157095
Closed, 500 points refunded.
Netminder
Site Admin
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vcenter 6 u2 install question 1 101
MS Access question 11 59
oracle query help 18 99
MSSQL Convert Char To Date 4 53
Creating and Managing Databases with phpMyAdmin in cPanel.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now