More and Better Examples of Label Expressions Using Python in ArcGIS

136
0
07-16-2014 09:52 AM
Status: Open
Labels (1)
RolandShield
New Contributor II
I want to use Python rather than VBScript to label items for various reasons. However, Python is proving to be very, very finicky in regards to syntax and context, relative to VBScript.

An example: in order to show labels of a date stamp in the "mm/dd/yyyy" format using VBScript, you simply apply the following code:  FormatDateTime(d,2)  Yes, that is it!

However, I have tried in many, many ways to accomplish the same thing using Python---for hours. And no success.
So I called tech. support and they don't know either. So they are going to "explore the idea" and get back to me.
Meanwhile, I asked them why there are not more expamples in the ESRI Resources Help [ http://resources.arcgis.com/en/help/main/10.1/index.html#//00s800000027000000 ] regarding, for instance, date labels and they suggested that I submit that "idea" (complaint?) here.