Convert DateTime Object to Date

1718
4
Jump to solution
07-17-2017 10:30 AM
MikeOnzay
Occasional Contributor III

I want to convert a date time value in a date field to a different date field where only the date displays. strptime and strftime seem to need strings. I can use the field calculator to essentially copy the date time value to the new date field but I can't figure out what I want to do using python in the field calculator.

10/14/1994 4:00:00 AM to 10/14/1994

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
MitchHolley1
MVP Regular Contributor

Using the Python parser in the Field Calculator, you can do the following: 

View solution in original post

4 Replies
MitchHolley1
MVP Regular Contributor

Using the Python parser in the Field Calculator, you can do the following: 

MikeOnzay
Occasional Contributor III

That was just too easy.

So, even though it is a date object you can still use a string method on it?

0 Kudos
MitchHolley1
MVP Regular Contributor

Yeah, I guess so!

0 Kudos
DanPatterson_Retired
MVP Emeritus

never guess.... datetime in python