Problem with date filtering

I need to print into my invoice template the issue date year (with century).

Based on Liquid documentation, this should work:

{{ issue_date | date: "%Y" }}

But instead of getting ‘2016’, I’m getting ‘Y’.

Can someone help me, please?


P.S. I searched the forum and I found a similar question, but no answer.

I think date formatting is not implemented consistently with Liquid documentation, so try:

{{ issue_date | date:"yy" }} or {{ issue_date | date:"yyyy" }}

That should work.

It worked, thanks a lot!

And to get a full date I used a combination:

{{ issue_date | date: “m” }} {{ issue_date | date: “yyyy” }}

with a result of " 30 juni 2016"