# FM - Calc to Get a Fiscal Year Text

I used the below formula to create a text field with the fiscal year (I was given a year end date to the fiscal year).  Only problem is that 10-11 reads as .1-11 because I thought the round function would force .1 to read as .10.  Any suggestions?

Right (
Round (
(Right ( GetAsNumber ( FiscalYrEnd_Txt );2) -1) / 100
; 2)
; 2)

& "-" & Right (FiscalYrEnd_Txt; 2)
LVL 2
###### Who is Participating?

PresidentCommented:
Right ( ( FiscalYrEnd_Txt -1 ) ; 2 ) & "-" & Right (FiscalYrEnd_Txt; 2)

Both FiscalYrEnd_Txt and the calc fields are text.
0

PresidentCommented:
so "10-11" means October 11 is the last day of the fiscal year or is that supposed to mean the 2010-2011 fiscal year?
0

PresidentCommented:
What does the input text for FiscalYrEnd_Txt look like?
0

Author Commented:
10-11 is the Fiscal year 2010-11 (I'm trying to save space in the portal by using 2-digit years).  The text for FiscalYerEnd/Txt is just a 4-digit year.  I'm guessing that I've made this too complicated and overthought it.
0

PresidentCommented:
I think perhaps your confusion might be around doing math with numbers that originate in a text field. In general, you can do math within a calculation that has a text result, even when the value originates in a text field. Sometimes such as when doing greater than and less than comparisons where one or more values are originating from text fields, it's necessary to surround the value with GetAsNumber() in order for the comparison to work.
0

Author Commented:
Yes, I didn't now that you could do any math with text.  Calcs are my weakness and need to spend more time on it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.