Is there a way to display previous and current year with dynamic text?
If so, what is the formatting?
I'm using ArcMap 10.0
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Adding the current year is easy - the following goes into the text element:
<dyn type="date" format="yyyy"/>
However, I don't know a way to use just dynamic text to do last year. For that I would use ArcPy to update a "pseudo dynamic" text element which may or may not be applicable to what you are trying to do.
This ArcGIS Discussion Forum posting indicates that I am right about not being able to do maths on dynamic text and that discussion has been repeated on this site in Doing Math calculations within ArcMap Dynamic Text? with the same conclusion.
Some time ago I released an eLearning video on Using Pseudo-dynamic Text in ArcPy Map Automation. It is not free but if you do want to pursue that as option, and need a quick intro to the coding pattern involved, then it is only a few dollars to purchase.
The coding pattern is to use Python to set a variable to the calculated date, and then to have a recognizable string in your static text element called perhaps
CalcDateVal, that ArcPy searches for and replaces with the contents of your variable.
Disclaimer: I am the author and presenter of the eLearning video tutorial mentioned above