date tag making me lose my mind!

I have a case of either blindness or something wrong with my installation…

i have humanize loaded… i know it is because all the tags i use work … like intcomma etc…

then i have a dict value for my_date … and i use the date tag for d/m/Y on it… and i get nothing… i tried :

{{ my_date|date:"d/m/Y" }}

even with a string

{{ "2023-03-03"|date:"d/m/Y" }}

and i get nothing… of course my_date without the tag shows me 2023-03-03. but i require it as 03/03/2023.

I have been using this tag for years now with no issue… any help would be appreciated .


From the docs for date at Built-in template tags and filters | Django documentation | Django, the value should be a datetime object.

The most likely explanation is that my_date isn’t a datetime object. Please show the view that you’re trying to do this with.

I read that too, but for some reason after reading posts and going down the chat gpt rabbit hole… i thought it could convert a string… never mind i just created my on date_formatter template tag.

Thanks for the response :slight_smile: