I created a variable named [Adj Year] that is returning the year as 2,014.
The variable formula is:
=If((MonthNumberOfYear([Scheduled First Payment])-1)=0 Then ((Year([Scheduled First Payment])-1)) Else (Year([Scheduled First Payment]))
The value that is returning from this variable is accurate, however, I would like to display only the year value...in this case, '14'
I have tried a couple of different things but am getting invalid date type errors.......
Can I create a new variable to simply trim [Adj Year] to display the last two characters?
Thanks
Hi,
try this :
[Year two digits ] = Right(""+If((MonthNumberOfYear([Scheduled First Payment])-1)=0 Then ((Year([Scheduled First Payment])-1)) Else (Year([Scheduled First Payment]));2).
What I´m doing is :
1 - Converting the Year returned, from number to text , (when I add a ""+ n front of any number, I´m typecasting - the process of transforming the type of a variable - the number to text) ;
2 - Take the two characters at the right.
Regards,
Rogerio
Add a comment