SIGN UP MEMBER LOGIN:    
Blog

Calculate current financial year

Posted by Deepak Sharma Blogs | Visual C# Feb 03, 2012
Calculate current financial year in C#

        public static string GetCurrentFinancialYear()
        {
            int CurrentYear = DateTime.Today.Year;
            int PreviousYear = DateTime.Today.Year - 1;
            int NextYear = DateTime.Today.Year + 1;
            string PreYear = PreviousYear.ToString();
            string NexYear = NextYear.ToString();
            string CurYear = CurrentYear.ToString();
            string FinYear = null;

            if (DateTime.Today.Month > 3)
                FinYear = CurYear + "-" + NexYear;
            else
                FinYear = PreYear + "-" + CurYear;
            return FinYear.Trim();
        }
share this blog :
post comment
 

help full post for me actually i am working on a software and there is diff. to find out fin. year and calculation . but it is essay to understand using your program....thanks again.

Posted by Sudhakar Chaudhary Feb 05, 2012