Solved

Compare Dates?????

Posted on 2002-04-21
4
126 Views
Last Modified: 2010-05-02
how could I take a date in the format 12/03/2000 and programatically determine how many days have past to present date.
E.G
12/03/2000 to 04/21/2002 how many days have past
0
Comment
Question by:hilltop
  • 2
4 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 6958710
use the DateDiff function like this:
msgbox datediff("d",#2000/03/12#,date)
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 140 total points
ID: 6958712
I mistype your date. You should read:

msgbox datediff("d",#12/03/2000#,date)
0
 
LVL 5

Expert Comment

by:KarcOrigin
ID: 6958747
Hi,

You can use it like this too:

DateDiff("d", Format("11/03/2000", "MM-DD-YYYY"), Format("12/03/2002", "MM-DD-YYYY"))

Thanks.

0
 
LVL 2

Author Comment

by:hilltop
ID: 6958810
thank you very much
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

920 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

16 Experts available now in Live!

Get 1:1 Help Now