Solved

Compare two dates

Posted on 1999-01-11
3
118 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 50 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 90
Macro: print each sheet to pdf using ExportAsFixedFormat 11 69
Microsoft Access combo box help 2 57
SLMGR Switches Are Not Working On KMS Host 3 164
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

733 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