Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field YearValue which has values such as 1-2014, 2-2014 etc. I wish to calculate last 12 months from 2 -2014 which would be 2 -2013. and store it in a variable. How do i do the same?
Thanks,
Asma
One value value - last 12th month, right? If so then then try like:
=Date(AddMonths(MakeDate(SubField(YearValue, '-',2), SubField(YearValue,'-',1)) , -12), 'MM-YYYY')
Update: Corrected
How do i find out the last 12th month? In this case, when we are selecting a value from the YearValue filed, then we are able to see the last 12th month.
e.g. currently we are in Sep 2014, so last 12th month should be displayed as Sep 2013 in a text box.
=SubField('Sep 2014',' ',1) & ' ' & (SubField('Sep 2014',' ',2)-1)
see this example