On Mon, 2009-08-03 at 11:08 -0700, zayatzz wrote:
> Hello.
> 
> I have this in my form (modelform) for birth_date field:
> birth_date = forms.DateField(('%d/%m/%Y',), label='Birth Date',
> required=False ), which overrides this in model:
> 
> birth_date = models.DateField(help_text="birth date",
> verbose_name="Birth date", blank=True, null=True, )
> 
> I also have jquery datepicker on the page which sets date in the same
> format (%d/%m/%Y). But the form saves date in %Y-%m-%d format in
> database, 

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



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to