I have the date in this format.I am using format() of monentjs. Currently mydate is in this format 2018-10-11T16:31:27+05:30
let newdate=let newdate=this.state.startDate.format();
I want to get this date in this format 2018-10-22. I tried using this
let formatfun=(date)=>{
let x=moment(date,"moment.HTML5_FMT.DATE");
return x;
}
but could not reach there .