[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Mid Month Date range in Crystal

Posted on 2010-03-23
3
Medium Priority
?
526 Views
Last Modified: 2012-05-09
Hi all,

How do I do a selection formula that looks for the "ActualClosingDate" to be between the 16th or the prior month to the 15th of the current month?
0
Comment
Question by:ISBTECH
3 Comments
 
LVL 18

Expert Comment

by:UnifiedIS
ID: 28351047
This will give you the ActualClosingDate from the 16th of last month through the 15th of this month:

{ActualClosingDate} >= DATE(YEAR(DATEADD("m", -1, TODAY)), MONTH(DATEADD("m", -1, TODAY)), 16)
    AND {ActualClosingDate} <= DATE(YEAR(TODAY), MONTH(TODAY), 15)
0
 
LVL 9

Accepted Solution

by:
shivkasi earned 2000 total points
ID: 28359948
One more (using IN and TO for Between):

{ActualClosingDate} IN
DateSerial(year(dateadd('m',-1,currentdate)),month(dateadd('m',-1,currentdate)),16)
TO
DateSerial(year(currentdate),month(currentdate),15)

0
 

Author Closing Comment

by:ISBTECH
ID: 31706042
Sorry for the delay thanks that worked perfectly!
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

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

When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

608 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