I want to convert `March 5th 2019` this format to `2019-02-28`.

```
moment(this.state.preferedDate).format('YYYY-MM-DD')

```

Used this code to do the task ,But its not working ,Getting the following message

> 
> Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), 
>  How to do it with moment js
> 
> 
>