eli411
asked on
Calculated the Date in C#
The system takes the current day you apply or check rates and adds the value in the Days to Close editor (30 days) to come up with an estimated closing date. From there, we figure out how many days are left in the month. If the estimated closing date falls on a Friday or the weekend, we moved the estimated closing date to the following Monday.
Using the application date or check rates date of 2/19/14, this means for your example, the average days to close is 30 which would put the closing date at March 20th. With a closing date of March 20th, the remaining days in the month would equal eight.
----Following is the code I had in C# but it is not calculating the Days Left In Month ----
---- It is calculating how many days left in a month ---
private state int retrieveInterestDays()
{
var today = DateTime.Now;
var day = today.Day;
var daysinmonth = DateTime.DaysInMonth(today .Year, today.Month);
return daysinmonth - day + 1;
}
Using the application date or check rates date of 2/19/14, this means for your example, the average days to close is 30 which would put the closing date at March 20th. With a closing date of March 20th, the remaining days in the month would equal eight.
----Following is the code I had in C# but it is not calculating the Days Left In Month ----
---- It is calculating how many days left in a month ---
private state int retrieveInterestDays()
{
var today = DateTime.Now;
var day = today.Day;
var daysinmonth = DateTime.DaysInMonth(today
return daysinmonth - day + 1;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi JamesBurger:
The purpose of this function I want to find out how many business day left for the month after adding 30 days! I am still testing it.
The purpose of this function I want to find out how many business day left for the month after adding 30 days! I am still testing it.
ASKER
I've requested that this question be closed as follows:
Accepted answer: 500 points for JamesBurger's comment #a39889945
Assisted answer: 0 points for eli411's comment #a39890326
for the following reason:
Very good!
Accepted answer: 500 points for JamesBurger's comment #a39889945
Assisted answer: 0 points for eli411's comment #a39890326
for the following reason:
Very good!
ASKER
Found solution from other web sites!
ASKER