• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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