Quantcast
Channel: Forums - ArcGIS for Desktop - General
Viewing all articles
Browse latest Browse all 2328

Label expression in Feature 10.1

$
0
0
i am trying to label a feature with the current time using the python parcer. i have done this in the past with VB but since this will be a service i need to use python. my VB code was : "Live Coverage Status"&vbnewline&Now() which returned this:
Attachment 24636
i have gotten this far with Python i just need to know what module of time was imported in the label expression:

def FindLabel ( ):
return "Live Coverage Status" +'\n'+ "time module goes here i.e. now()"




solved it with:
def FindLabel ( ):
import time
return "Live Coverage Status\n"+ time.strftime("%m/%d/%Y %H:%M")
Attached Thumbnails
Click image for larger version

Name:	Label Expression_2013-05-24_10-41-44.png‎
Views:	N/A
Size:	11.8 KB
ID:	24636  

Viewing all articles
Browse latest Browse all 2328

Trending Articles