.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Expiration Day Calculation

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Sql Server


I have this problem and I'm trying to find an algorithm but it doesn't work.

I have a process to load invoices in my system.

For example : Provider A, the invoice load is the 21th of each month, according to this, I'm displaying an image green or red, if the invoice is loaded <= 21, the image is green, if the invoice is loaded > 21 sis red, based on this, I need to create my algorithm.  I have a lot of providers with different invoice load.

Any idea?
Thank you in advance.


View Complete Post

More Related Resource Links


How to calculate childs age,but when i enter childs age as '03/27/2007' it returns 3 years where as actual age is 2 yr 11 months

calculation, field and map traverse adjustment, and coordinate transformation

Free Pocket PC land surveying software -- COGO calculation, field and map traverse adjustment, and coordinate transformation -- for students and professionals.

Excel Services: Develop A Calculation Engine For Your Apps


The Excel Services architecture lets users design their own algorithms and share workbooks on a server.

Vishwas Lele and Pyush Kumar

MSDN Magazine August 2007

Force password expiration after x days


Using C# and sqlmembershipprovider forms authentication, is there a way to force user password to expire and need to be reset after x number of days?

So if a user launches the website login.aspx page, when they type their userid, it will check if the password is expired and direct them to a Resetpassword.aspx page?

Blog site Restrictions -- How to set an expiration date on blog posts

I just created a new Blog site in Sharepoint 2007, and set permisions to the users and admins.
Now, I have a question on how to set the post life time. Is there any setting to contral how many days that the posts can last in the blog? We want the post include the comments kept in the site for one month.

Please help.


Absence and vacation days webparts calculation



does any1 know if there is a webpart that can calculate an employee's vacation days. and when the employee request some vacation days it show the days that are left.

or is there a tutorial to create such a webpart?


SharePoint 2007 Expiration Policy Not working : Access denied for the site


I have a SharePoint 2007 List with Expiration Enabled in Information and Policy Management. I have a datatime column ExpiryDate which i used in Expiration. On Expiration I have chose to delete the item. Through Central Admin I run the expiration by clicking "Process Expired Items now" button. I got the following error in the Windows event viewer.

Expiration Service for site http://md-rmanimaran failed.

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

EventID: 5016

Category: Information Policy Management 

Where I need to specify the login details to get rid of this error? Anybody Please help..




Automatic expiration of forms authentication when user closes the browser windows without signing ou

Dear all, can u tell me how to automatically sign out a user if he/she closes the browser window without signing out. I'm using Forms Authentication.   Thanks 

Problem with calculation in combination with crossjoin

Hi fellows   I dont know how to rewrite my MDX in order to get the correct result.    The following MDX statement is reduced to a minimum in order to explain my problem: WITH    MEMBER [Article].[Article].[Article_CE]    AS AGGREGATE ([Article].[Article].[Article_1], [Customer].[Customer].[Unknown], [Location].[Location].[USA])              SELECT       {[Measures].[SalesNet]       ,[Measures].[Budget] } ON COLUMNS ,       NON EMPTY         [Customer].[Customer].[Customer].members         * {[Article].[Article].[Article].members          ,[Article].[Article].[Article_CE]} ON ROWS FROM SALES   If i dont display the customer hierarchie " [Customer].[Customer].[Customer].members " on rows, then every thing works fine! As Soon as I add the above customer hierarchie to my mdx statment, then every thin works fine except for my member " [Article].[Article].[Article_CE]". Instead of showing only one row for customer "Unknown" (see Member definition), a row appears for each customer and with the same SalesNet and Budget.   Any Idea how to rewrite my mdx ?   best regards Pellito

Text Calculation - Removing all text after space

I have a list with workflows that was created for one of our clients that allows them to enter some information and the workflow takes care of sending emails to the necessary recipients as well as notifying the person the task is assigned to when it has reached a certain status or age. The "agent name" colum contains the agent's first and last name (ie John Smith).  I am wondering if there is a way that in the workflow, when an email is generated, if I am able to remove the last name using some sort of text calculation.  The reason I would like to try and do it this way if possible is that if I add the Columns Agent First Name and Agent Last Name, the current Agent Name colum that is being used to generate the agent's name in the email will now not be the correct column to use for this information and the 100s of entries already in the lists will not send out emails properly. Does anyone have a suggestion for this, or know some sort of text calculation formula that I can use to remove the last name from the lookup in the email?

Percentile calculation performance

Hi, With the help of other members in this forum we created a solution to calculate percentile based on a dimension attribute (see Percentile Calculation ). However, performance is quite an issue - it takes about half a minute to calculate percentile on our cube (median calculation takes couple seconds). I do not think that our cube is an issue here because it also takes a while to compute it using Adwenture Works. How to improve the performance of query? Thanks

Enhance SSAS so that a calculation returns multiple cells at once (Excel fill not a single cell but

I wonder if somebody can help me with the following question. I would like to create an enhancement to SSAS in a way so that one can pass in multiple values, run a calculation and in return retrieves not one but multiple cell results at the same time e.g. retSet = functionABC(inSET) where inSet is somthing like 5 4 3 6 7 3 4 4 AND retSet is 4 6 7 8 9 3 4 4 All my calculated members in MDX return a single value BUT I need to have a calculation that if called returns multiple results (a set) at once and in a way so that Excel will properly pick up on it and consequently fills multiple cells in the Pivot table. Is that possible at all and if so how? I would not mind to write a little CLR assembly to enhance the SSAS but don't know how to pass the results back. Any ideas are highly appreciated. Dirk

Performancepoint Scorecard KPI Calculation problem

Hi, i want to calculate the profit in percent from a P/L statement Dimension. i use the following calculation: CREATE MEMBER CURRENTCUBE.[Measures].[CompanyEarnings] AS (     sum( setIncome, [Saldo] )+     sum( setCosts, [Saldo] )   ) / sum( setIncome, [Saldo] ) The Performance-Point Scorecard is Filtered by a Year-Month Hierarchy filter with the following Formular: ([Time].[Year - Month].[Month].&[2010-01-01T00:00:00]):<<UniqueName>> This Formular works fine for the Months, but the sum for the  Year is not calculating on only the selected months, its calculating on the hole year income and costs. If i use a filter on a set with the same months which i hoped was selected with the Scorecard-Filter, it worked fine. Here is the filter which worked, but is not dynamic: SET CURRENTCUBE.[setMonths] AS { [Time].[Month].&[2010-01-01T00:00:00], [Time].[Month].&[2010-02-01T00:00:00], [Time].[Month].&[2010-03-01T00:00:00], [Time].[Month].&[2010-04-01T00:00:00], [Time].[Month].&[2010-05-01T00:00:00], [Time].[Month].&[2010-06-01T00:00:00], [Time].[Month].&[2010-07-01T00:00:00] }; If i change the function that it use this filter all calculations seems to be fine: CREATE MEMBER CURRENTCUBE.[Measures].[CompanyEarnings] AS (     sum( setIncome, [Saldo] )+     sum( setCos

getting minutes from calculation in gridview

Hi..I have to change the background colour of a calculated field (just the cell not the whole row) in my gridview called ElapsedTime, based on the number of minutes e.g > 30 mins background is red.I have already done something simliar for hours..I have succesfully written a sql statement that calculates elapsed timeCONVERT(Varchar, (DATEPART(dd, GETDATE() - DateAdded)-1) * 24 + DATEPART(hh,GETDATE() - DateAdded)) + 'h:' + CONVERT(Varchar, DATEPART(mi, GETDATE() - DateAdded)) + 'm' AS ElapsedTimeElapsed time looks like this e.g 11h:14mI then used this bit of code to get the hourProtected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GridView1.RowDataBound        Dim et As String                ' For Each r As GridViewRow In GridView1.Rows        If e.Row.RowType = DataControlRowType.DataRow Then            et = e.Row.Cells(13).Text            et = et.Substring(0, et.IndexOf("h"))            Dim number As Integer = Int32.Parse(et)            If e.Ro

SSRS 2008 Sum Calculation in text box

Hi,  Any one pls tell me how to calculate sum of text box values in SSRS 2008. (sum(Fields!Total_Days.Value, "DS_Monthday") - sum(Fields!Weekends.Value,  "DS_Weekends")) - (datediff("d",DATEADD("d",-(DAY(Today())-1),Today()),Today()))   * (Count(Fields!ClientID.Value, "DS_AVGRate")/Count(Fields!DimGPClientID.Value)) +  count(Fields!ClientID.Value, "DS_AVGRate"),Count(Fields!DimGPClientID.Value))   i want to calculate sum of the above expression in text box. I have tried it is showingerror  Aggregate function will not support in text box Pls help me to show the whole sum of above expression in text box only. Thanks in advance. Regards, Abdul2010

wrong Percentage calculation showing in pie chart

Hi,       Im using "#PERCENT{P2}" this one to calculate percentage in pie chart.  It should take 2 decimal only rite? But it is taking 3 decimal values. Example: 20.90678 After applying the formula "#PERCENT{P2}"  it is showing as 20.91 i want to show as 20.90 only pls help me Thanks in advance, Abdul2010
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend