That isn't quite correct. Databases do not save datetimes as strings in
any particular format. They save them as some kind of internal object.
What you are seeing is that the widget rendering is using the %Y-%m-%d
format for some reason. You should investigate that part of the code
more closely. It won't involve the database at all (although it might be
the path of creating a form from your model data that shows the issue --
so try to simulate that without using the database at all).
Regards,
Malcolm
Thanks everybody.
I changed this :
birth_date = forms.DateField(('%d/%m/%Y',), label='Birth Date',for this :
required=False ),
birth_date = forms.DateField(('%d/%m/%Y',), label='Birth Date',required=False, widget=forms.DateInput(format='%d/%m/%Y') )
And it all works very good.
But there's something else fishy here.
If i tried this:
birth_date = forms.DateField(label='Birth Date', required=False,
widget=forms.DateInput(format='%d/%m/%Y') )
Then it did not save in correct format again. But guess in which
format did it save?
%m/%d/%Y
Why the hell though? could this be a minor bug in django code?