I have a Date column called readings_measurement_tstamp stored in my feature class. I would like to add a String column to this feature class and Field Calculate it to be be just the %H:%M:%S component of readings_measurement_tstamp. After adding the new column I calculated it according to the following expression:
datetime.datetime.strftime( !readings_measurement_tstamp! ,'%H:%M:%S')
I was under the impression that Date columns can be referenced like python datetime objects. Therefore, I was very confused when running the field calculator with this expression gave the following error:
Descriptor 'strftime' requires a 'datetime.date' object but received an 'str'
The error implies to me that readings_measurement_tstamp is being stored as text, not as a Date. Any ideas what I need to do in order to be able to access readings_measurement_tstamp as a datetime object? Thanks!