Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Date and time calculations

$
0
0
Just wondering if anyone can tell me why my expression is not working to calculate some values in a table?

Below the !DateTime! and !Time! are fields in a File geodatabase. Basically I need to combine the two fields, where DateTime currently has the correct date for the record and !Time! has a random date and the correct time I need combined with the first field.

Code:

datetime.combine (datetime.strptime ( !DateTime!, %Y %m %d), datetime.strptime (!Time!, %H:%M:%S))

Viewing all articles
Browse latest Browse all 2485

Trending Articles