3👍
✅
Use datetime.datetime.date()
to get the date
component like so:
a = A()
b = B()
# Stuff
b.x = a.x.date()
See http://docs.python.org/library/datetime.html#datetime-objects for more details.
Source:stackexchange.com