Question : Financial Year Function/Calculation ASP.NET

Hi Experts, I am aware of the function
 Dim weekNum As Integer = DatePart(DateInterval.WeekOfYear, Today.Date, , FirstWeekOfYear.FirstFullWeek) that I had been using until now to calculate the week number for any given date. There is now a new requirement i.e. to calculate the week number when the year does not start on the 1st of January, in this case it starts on the 1st of October. Any ideas on how I can come up with a function/calculation to do this?

Answer : Financial Year Function/Calculation ASP.NET

here is a simpler formula. Base = week of calender year for oct. 1st.  Target = week of year for the date that you want week of financial year.

week of financal year =

target - base  OR  target - base + 52.

i hope this is easier to understand.

Random Solutions  
 
programming4us programming4us