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
Solved

Between Date and Year End

Posted on 2014-11-14
5
220 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

789 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