> I’ve a question about the date format in Django.
> When I create a message for the users I enter the date in the
> database. But when I retrieve the date it come out like this: yyyy-mm-
> dd. I would like to make it like:
> dd mm yyyy and the month should be printed with the name of the month,
> like November so it would be:
> 05 November 2008
> I’ve search some sites about date format but can’t seem to find a
> solutions to my problem or if Django have a preinstalled function to
> modify the date format.

I'm not sure what you're missing, but if you google for "django 
date format" the page (linked twice below) is the very first 
result.  You should be able to just use the date filter[1] with 
the right format string[2], something like

   {{ some_obj.some_date_field|date:"d F Y" }}

-tim



[1]
http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#date

[2]
http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#now









--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to