[CLOSED] Trying to count the matters based on date range-Help needed ASAP
I am trying to count the number of matter beased on the date ranges. I have to dates open date and the resolved date. I am looking at those matters which are active i.e where resolved date is Null. This is one senario.
But i am facing problem when the open date and resolved date does not fall on the same month
Eg - if the open date of a particular matter is 02 Feb 2010 and the matter resolved date is 02 May 2010, so i need to get the count for that matter to be one for the month of Feb, Mar, and Apr.
can anyone please help me wiht thisThis message has been edited. Last edited by: Kerry,
769 Excel,PDF and HTML
July 27, 2010, 05:29 AM
Dan Satchell
If your dates are SmartDates, you can use function DATEDIF to calculate the number of months between two dates. If the resolved date is NULL you could use the current date as the resolved-date for determining how many months the issue has been open.
EDIT: The above will give you whole months. If you prefer to include fractions of a month, then use DATEDIF to calculate the difference in days and divide by 30 to get a close approximation of months with fractions thereof.
This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
July 27, 2010, 09:51 AM
Francis Mariani
I would suggest not putting "ASAP" in the forum post subject, specially since most of the people helping you are in a time zone where we're still sleeping.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server