
I'm trying to automate updates to the dynamic date in a Pro 3.3.2 map document. The dynamic date is in a text element named PrintDate. I can access the element, but not the date. Things I've tried:
for lyt in aprx.listLayouts():
for elm in lyt.listElements('TEXT_ELEMENT'):
if elm.text.endswith("2024"):
print(f'{elm.name} | {elm.text}') #prints out the one other element in the document with 2024, not the dynamic date
elif elm.name == "PrintDate":
print(f'{elm.name} | {elm.text}') #prints out the whole text element with the dynamic date format
I'm not after making the date un-dynamic as there are dozens of maps with this set-up. Anyone have an idea?