Solved

Compare Dates?????

Posted on 2002-04-21
4
130 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
[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
  • 2
4 Comments
 
LVL 70

Expert Comment

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

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

717 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