AnsweredAssumed Answered

Labeling with Dates

Question asked by ndglover21 on Jan 21, 2014
Latest reply on Jan 21, 2014 by ndglover21
Hello everyone,

I'm trying to label a feature class that has a date field in it. My problem is that I only want to get the mm/dd/yyyy, but when I try to label it through python it will bring up the time as well. I tried using an array on dateOff (the date field), but I still run into the issue of it grabbing part of the time. My question is, what do I need to do in my python script to only get the date information and not the time information to show up in my label.

Here is a sample of what I have done so far.
import os  def FindLabel ( [Cause_Of_Outage] , [Date_Off] ):   outageType = [Cause_Of_Outage]    dateOff = [Date_Off]    return 'Outage Type: ' + outageType + os.linesep +'Date Off: ' + dateOff[0:10]