I need a financial year based on current or today's datetime.
Suppose if we consider today's date is 10 April 2011
, then i need the outputs as Financial Year 2012
and for some cases i need to display the same output in short format as FY12
. Both ways i want to display.
In our requirement financial Year considered is from April
(the current year) to March
(following year).
Based on current datetime...the scenario of output is depends on the current datetime falls in the below said period or duration.
From 01April2011 to 31March2012 - Financial Year 2012 or FY2012
From 01April2012 to 31March2013 - Financial Year 2013 or FY2013
From 01April2013 to 31March2014 - Financial Year 2014 or FY2014
.
.
.
so on....
Another example: If we take today's datetime as 16April2012, then the output is needed as Financial Year 2013
and also FY13
.
Please help how to acheive the same in very short format using LINQ or Regex in C#, .Net3.5