0

Is there a built in filter in angular to convert my unix timestamp to a human readable date format?

I have tried the following:

{{ ::time | date:"medium" }}

But it gives wrong results:

1232346882 gives Jan 15, 1970 7:19:06 AM

How can I fix that?

1 Answer 1

1

You need to convert seconds to milliseconds... Try it with 1232346882000.

{{ 1232346882000 | date:"medium" }}

Fiddle

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.