2

I'm trying to display a date using the date action, but it's giving odd output.

{{ mydate | date:'mm/dd/yyyy' }}

The month seems to be inconsistent and incorrect. What's wrong here?

2 Answers 2

3

You need to use MM to display the month:

{{ mydate | date:'MM/dd/yyyy' }}

From the documentation

'MM': Month in year, padded (01-12)
...
'mm': Minute in hour, padded (00-59)
Sign up to request clarification or add additional context in comments.

Comments

0

You need to use date:'MM/dd/yyy'

mm is for minutes, MM is for months

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.