Solved

Between Date and Year End

Posted on 2014-11-14
5
217 Views
Last Modified: 2014-11-14
Experts,

I need a formula that returns data between the current date and the year end.

I have the following and I need to modify it as so.
Between Date() And Date()+Nz([Enter Number of Days in Future],100000) Or Is Null

thank you
0
Comment
Question by:pdvsa
  • 2
  • 2
5 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40442915
I prefer the following syntax:

>= Date() AND < DateSerial(Year(date()) + 1, 1, 1)
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40442926
Not knowing whether the field you are trying to filter on contains only date data, if you use the BETWEEN syntax, and use DateSerial(Year(Date()) + 1, 1, 1) then you would also retrieve data for Jan 1, 2015.  By using the < you are certain to get only data pertaining to 2014.
0
 

Author Comment

by:pdvsa
ID: 40443024
Dale, thanks.  I think I need to include days that are 5 days after year end.  I think I would need Between and that DateSerial if I am thinking correctly.  Not sure exactly what I need to change for 5 days after year end.  Could you help me with that?
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 40443197
That would be:

Between Date() And DateSerial(Year(Date()) + 1, 1, 5)

/gustav
0
 

Author Closing Comment

by:pdvsa
ID: 40443596
Perfect.  Thank you
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now