[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Data calc

Posted on 2000-05-09
4
Medium Priority
?
189 Views
Last Modified: 2010-05-02
I need to take a date inputed by the user and substract that date up to 24 months.  The Database has the dates as 01/01/00, we were planning to enter it the same way.  But I am open the requirement is to be able to take the end date the user input and subtract up to 24 months for the start dated of the search.  So what I am looking for is ideas to achive this in code.
0
Comment
Question by:akeyes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 14

Expert Comment

by:mcrider
ID: 2792577
Using the DateAdd function, you can add and subtract time intervals from dates...

For example, this adds 1 month to now:   dateadd("m",1,now)

This subtracts 1 month from now:  dateadd("m",-1,now)


Cheers!®©
0
 
LVL 14

Accepted Solution

by:
mcrider earned 400 total points
ID: 2792602
You can also do this:

x=dateadd("m",-24,"01/01/00") 'will return the date 1/1/98

Cheers!®©
0
 

Author Comment

by:akeyes
ID: 2800936
Thank you, I knew it was something simple.  I just could not for the life of me find it.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2803109
Thanks for the points! Glad I could help!


Cheers!®©
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

649 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