?
Solved

Date Range

Posted on 2002-07-15
5
Medium Priority
?
176 Views
Last Modified: 2010-05-02
Hi!

how can I take a date and compare it to a number of days?

for exemple


signupDate = "27/06/2002"
today = date()
if((date - signupDate) > 30) then

?? Thanks
0
Comment
Question by:nfuids
  • 2
  • 2
5 Comments
 
LVL 20

Accepted Solution

by:
hes earned 200 total points
ID: 7155492
Use This

Dim FileDiff
FileDiff = DateDiff("d",signupDate,today)
If FileDiff > 30 then.....
0
 
LVL 11

Expert Comment

by:joekendall
ID: 7155499
Dim dSignup As Date
Dim dToday As Date

dSignup = "27/06/2002"
dToday = Date()

If dToday-dSignup > 30 Then
    'Do whatever you want to do here
End If

Thanks!

Joe

0
 

Author Comment

by:nfuids
ID: 7155500
great, what type should I declare FileDiff as ?
0
 
LVL 20

Expert Comment

by:hes
ID: 7155507
DateDiff Returns a Variant (Long)
0
 

Author Comment

by:nfuids
ID: 7155514
Thanks for a quick answer
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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
Course of the Month8 days, 23 hours left to enroll

621 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