Link to home
Start Free TrialLog in
Avatar of maqskywalker
maqskywalker

asked on

Date calculations with c# in asp.net web forms

I'm using c# in a asp.net web forms page.

The fiscal year period runs from July 1 to June 30 of the next year.

For example FiscalYear 2017, is the period from 07/01/2016 to 06/30/2017

For example FiscalYear 2016, is the period from 07/01/2015 to 06/30/2016

On my page I'm going to have a asp Textbox and a asp button

What I want is, I'm going to type a date in the Textbox and then when I click the button , on the same page I want it to display a message saying what fiscal year that date is in.

So for example, if I type this date in the Textbox  08/23/2015 and then I press the button, the message on the page will say
"The date you entered is in FiscalYear 2016"

So for example, if I type this date in the Textbox  02/12/2014 and then I press the button, the message on the page will say
"The date you entered is in FiscalYear 2014"

Any ideas of what I do with the date entered in the Textbox in order to find what fiscal year it is in?
That's the part I'm having trouble with.
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maqskywalker
maqskywalker

ASKER

Thanks