I'm getting a date from an API as
2017-04-20T07:00:00Z
How could I format it into the following?
20.04.2017
I'm using React to display the date:
<div>{props.data.day}</div>
I tried for example toISOString().slice(0, 10); but couldn't get that to work properly. I also tried looking at other answers, but couldn't find a solution yet.