• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 138
  • Last Modified:

Compare Dates?????

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
hilltop
Asked:
hilltop
  • 2
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
use the DateDiff function like this:
msgbox datediff("d",#2000/03/12#,date)
0
 
Éric MoreauSenior .Net ConsultantCommented:
I mistype your date. You should read:

msgbox datediff("d",#12/03/2000#,date)
0
 
KarcOriginCommented:
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
 
hilltopAuthor Commented:
thank you very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now