For my django app, I want to convert datetimefield to datefield. That resulting in an error :
Date truncation for column ...
Can you please tell me how to do this ?
I have tried this:
I have written a datamigration before schemamigration that modifies values of datetimefield from datetime to date .
obj.datetimefield = obj.datetimefield.date()
obj.save() --- error here.