?
Solved

Compare two dates

Posted on 1999-01-11
3
Medium Priority
?
120 Views
Last Modified: 2010-05-03
VB5
---
How can I compare two dates from the FileDateTime() function? I want to see which file is older.
0
Comment
Question by:liljegren
[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 Comments
 

Author Comment

by:liljegren
ID: 1455352
Naturally, I don't want the program to crasch on a computer with another regional date setting. :-)
0
 
LVL 3

Accepted Solution

by:
jjbyers earned 150 total points
ID: 1455353
Use the DateDiff function. It will return the interval between the two dates.
0
 
LVL 18

Expert Comment

by:deighton
ID: 1455354
use CDbl to change the results of FileDateTime and store in double variables.  Compare the values - the higher the value the later the date.
0

Featured Post

Industry Leaders: 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

765 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